| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 char TypeInfo<T>::s_typeIDHelper; | 112 char TypeInfo<T>::s_typeIDHelper; |
| 113 | 113 |
| 114 struct FunctionInfo | 114 struct FunctionInfo |
| 115 { | 115 { |
| 116 TypeCategory returnType; | 116 TypeCategory returnType; |
| 117 TYPEID pointerType; | 117 TYPEID pointerType; |
| 118 std::vector<TypeCategory> args; | 118 std::vector<TypeCategory> args; |
| 119 bool instance_function; | 119 bool instance_function; |
| 120 int effectiveArgs; | 120 int effectiveArgs; |
| 121 TypeCategory effectiveReturnType; | 121 TypeCategory effectiveReturnType; |
| 122 char name[1024]; | 122 std::vector<char> name; |
|
sergei
2017/05/08 09:16:29
We are converting it later to std::string, I think
Wladimir Palant
2017/05/08 10:17:18
Done.
| |
| 123 | 123 |
| 124 FunctionInfo(); | 124 FunctionInfo(); |
| 125 | 125 |
| 126 FunctionInfo(TypeCategory returnType, TYPEID pointerType, | 126 FunctionInfo(TypeCategory returnType, TYPEID pointerType, |
| 127 std::initializer_list<TypeCategory> argTypes, bool instance_function, | 127 std::initializer_list<TypeCategory> argTypes, bool instance_function, |
| 128 void* function); | 128 void* function); |
| 129 | 129 |
| 130 template<typename ReturnType, typename... Args> | 130 template<typename ReturnType, typename... Args> |
| 131 FunctionInfo(ReturnType (*function)(Args...)) | 131 FunctionInfo(ReturnType (*function)(Args...)) |
| 132 : FunctionInfo(TypeInfo<ReturnType>(), | 132 : FunctionInfo(TypeInfo<ReturnType>(), |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 337 | 337 |
| 338 template<typename ReturnType, typename... Args> | 338 template<typename ReturnType, typename... Args> |
| 339 namespace_& function(const char* name, ReturnType (*method)(Args...)) | 339 namespace_& function(const char* name, ReturnType (*method)(Args...)) |
| 340 { | 340 { |
| 341 bindings_internal::register_namespace_method(mName, name, method); | 341 bindings_internal::register_namespace_method(mName, name, method); |
| 342 return *this; | 342 return *this; |
| 343 } | 343 } |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 void printBindings(); | 346 void printBindings(); |
| OLD | NEW |