special cases and other things in wxPython, and since I plan on making several more, I've decided to put the SWIG sources in wxPython's CVS instead of relying on maintaining patches. This effectivly becomes a fork of an obsolete version of SWIG, :-( but since SWIG 1.3 still doesn't have some things I rely on in 1.1, not to mention that my custom patches would all have to be redone, I felt that this is the easier road to take. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
		
			
				
	
	
		
			20 lines
		
	
	
		
			738 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			738 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /* Magic variable code */
 | |
| #ifndef PERL_OBJECT
 | |
| #define swig_create_magic(s,a,b,c) _swig_create_magic(s,a,b,c)
 | |
| static void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) {
 | |
| #else
 | |
| #define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
 | |
| static void _swig_create_magic(CPerlObj *pPerl, SV *sv, char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) {
 | |
| #endif
 | |
|   MAGIC *mg;
 | |
|   sv_magic(sv,sv,'U',name,strlen(name));
 | |
|   mg = mg_find(sv,'U');
 | |
|   mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
 | |
|   mg->mg_virtual->svt_get = get;
 | |
|   mg->mg_virtual->svt_set = set;
 | |
|   mg->mg_virtual->svt_len = 0;
 | |
|   mg->mg_virtual->svt_clear = 0;
 | |
|   mg->mg_virtual->svt_free = 0;
 | |
| }
 | |
| 
 |