Skip to content

Commit 260eca7

Browse files
committed
Change the flag of NewPointer to the SWIG provided constant SWIG_POINTER_OWN, to make it clearer.
1 parent 280a54a commit 260eca7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/fox16_c/FXRbObjRegistry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ VALUE FXRbObjRegistry::NewBorrowedObj(void *ptr,swig_type_info* ty){
5252
ObjDesc *desc;
5353

5454
if(FXMALLOC(&desc,ObjDesc,1)){
55-
VALUE obj = SWIG_Ruby_NewPointerObj(ptr,ty,1);
55+
VALUE obj = SWIG_Ruby_NewPointerObj(ptr,ty,SWIG_POINTER_OWN);
5656
FXTRACE((1,"FXRbNewPointerObj(foxObj=%p) => rubyObj=%p (%s)\n",ptr,(void *)obj,safe_rb_obj_classname(obj)));
5757
desc->obj = obj;
5858
desc->type = borrowed;

ext/fox16_c/FXRuby.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ VALUE FXRbNewPointerObj(void *ptr,swig_type_info* ty){
7474
}
7575

7676
VALUE FXRbNewPointerObjCb(void *ptr,swig_type_info* ty){
77-
return SWIG_Ruby_NewPointerObj(ptr, ty, 1);
77+
return SWIG_Ruby_NewPointerObj(ptr, ty, SWIG_POINTER_OWN);
7878
}
7979

8080

0 commit comments

Comments
 (0)