comparison tools/gen_v8_binding.m4 @ 670:f0b4fbcd1c51

Support encapsulated method & function return Handle<Value> directly
author Thinker K.F. Li <thinker@branda.to>
date Thu, 05 Aug 2010 17:42:36 +0800
parents eeea1b593a2f
children 5c8387fd123e
comparison
equal deleted inserted replaced
669:eeea1b593a2f 670:f0b4fbcd1c51
222 define([OBJ], [arg_$][1])dnl 222 define([OBJ], [arg_$][1])dnl
223 define([STR], [arg_$][1])dnl 223 define([STR], [arg_$][1])dnl
224 define([FUNC], [arg_$][1])dnl 224 define([FUNC], [arg_$][1])dnl
225 define([SELF], [self])dnl 225 define([SELF], [self])dnl
226 define([ERR], [&_err])dnl 226 define([ERR], [&_err])dnl
227 define([VAL], [&_err])dnl
227 ]) 228 ])
228 229
229 define([START_METHOD_RET_VAL], [dnl 230 define([START_METHOD_RET_VAL], [dnl
230 define([INT], [dnl 231 define([INT], [dnl
231 int _ret; 232 int _ret;
239 define([STR], [dnl 240 define([STR], [dnl
240 char *_ret; 241 char *_ret;
241 ])dnl 242 ])dnl
242 define([FUNC], [dnl 243 define([FUNC], [dnl
243 Handle<Function> _ret; 244 Handle<Function> _ret;
245 ])dnl
246 define([VAL], [dnl
247 Handle<Value> _ret;
244 ])dnl 248 ])dnl
245 ]) 249 ])
246 250
247 define([START_VAR], [dnl 251 define([START_VAR], [dnl
248 define([INT], [dnl 252 define([INT], [dnl
266 define([INT], [_ret = (int)])dnl 270 define([INT], [_ret = (int)])dnl
267 define([NUMBER], [_ret = (double)])dnl 271 define([NUMBER], [_ret = (double)])dnl
268 define([OBJ], [_ret = ($][2 *)])dnl 272 define([OBJ], [_ret = ($][2 *)])dnl
269 define([STR], [_ret = (char *)])dnl 273 define([STR], [_ret = (char *)])dnl
270 define([FUNC], [_ret = ])dnl 274 define([FUNC], [_ret = ])dnl
275 define([VAL], [_ret = ])dnl
271 ]) 276 ])
272 277
273 define([START_METHOD_RET], [dnl 278 define([START_METHOD_RET], [dnl
274 define([INT], [ 279 define([INT], [
275 _ret_val = Integer::New(_ret); 280 _ret_val = Integer::New(_ret);
282 ])dnl 287 ])dnl
283 define([STR], [ 288 define([STR], [
284 _ret_val = String::New(_ret); 289 _ret_val = String::New(_ret);
285 ])dnl 290 ])dnl
286 define([FUNC], [ 291 define([FUNC], [
292 _rt_val = _ret;
293 ])dnl
294 define([VAL], [
287 _rt_val = _ret; 295 _rt_val = _ret;
288 ])dnl 296 ])dnl
289 ]) 297 ])
290 298
291 define([STOP_METHOD_ARG], [dnl 299 define([STOP_METHOD_ARG], [dnl