]> git.saurik.com Git - wxWidgets.git/blob - wxPython/wxSWIG/swig_lib/perl5/perl5mg.swg
Patch [ 588732 ] makes wxRB_GROUP/radiobuttons working
[wxWidgets.git] / wxPython / wxSWIG / swig_lib / perl5 / perl5mg.swg
1 /* Magic variable code */
2 #ifndef PERL_OBJECT
3 #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
4 static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
5 #else
6 #define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
7 static void _swig_create_magic(CPerlObj *pPerl, SV *sv, char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) {
8 #endif
9 MAGIC *mg;
10 sv_magic(sv,sv,'U',name,strlen(name));
11 mg = mg_find(sv,'U');
12 mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
13 mg->mg_virtual->svt_get = get;
14 mg->mg_virtual->svt_set = set;
15 mg->mg_virtual->svt_len = 0;
16 mg->mg_virtual->svt_clear = 0;
17 mg->mg_virtual->svt_free = 0;
18 }
19