Commit d28be8fbe8ab2b8610debbc87f608977f53ab6ef

Authored by Georg Hopp
1 parent 7a1c975c

fix PARENTCALL. We need the current class context to find the right parent.

Showing 1 changed file with 14 additions and 14 deletions
@@ -280,13 +280,13 @@ @@ -280,13 +280,13 @@
280 * 280 *
281 * \see TR_CALL 281 * \see TR_CALL
282 */ 282 */
283 -#define TR_PARENTCALL(object,_iface,method,...) \  
284 - do { \  
285 - struct i_##_iface * iface; \  
286 - TR_class_ptr pc_class = TR_GET_CLASS((object)); \  
287 - assert(TR_HAS_PARENT(pc_class)); \  
288 - _TR_CALL(pc_class->parent, _iface, method); \  
289 - iface->method(object, ##__VA_ARGS__); \ 283 +#define TR_PARENTCALL(class, object,_iface,method,...) \
  284 + do { \
  285 + struct i_##_iface * iface; \
  286 + TR_class_ptr pc_class = TR_CLASS_BY_NAME(class); \
  287 + assert(TR_HAS_PARENT(pc_class)); \
  288 + _TR_CALL(pc_class->parent, _iface, method); \
  289 + iface->method(object, ##__VA_ARGS__); \
290 } while(0) 290 } while(0)
291 291
292 /* 292 /*
@@ -295,13 +295,13 @@ @@ -295,13 +295,13 @@
295 * 295 *
296 * \see TR_RETCALL 296 * \see TR_RETCALL
297 */ 297 */
298 -#define TR_PARENTRETCALL(object,_iface,method,ret,...) \  
299 - do { \  
300 - struct i_##_iface * iface; \  
301 - TR_class_ptr pc_class = TR_GET_CLASS((object)); \  
302 - assert(TR_HAS_PARENT(pc_class)); \  
303 - _TR_CALL(pc_class->parent, _iface, method); \  
304 - ret = iface->method(object, ##__VA_ARGS__); \ 298 +#define TR_PARENTRETCALL(class, object,_iface,method,ret,...) \
  299 + do { \
  300 + struct i_##_iface * iface; \
  301 + TR_class_ptr pc_class = TR_CLASS_BY_NAME(class); \
  302 + assert(TR_HAS_PARENT(pc_class)); \
  303 + _TR_CALL(pc_class->parent, _iface, method); \
  304 + ret = iface->method(object, ##__VA_ARGS__); \
305 } while(0) 305 } while(0)
306 306
307 307
Please register or login to post a comment