Remove SWIG_Get_Type function usage in class constants.

Add class constant typemaps. (classconsttab)
This commit is contained in:
Nihal 2017-07-12 08:29:27 +05:30
commit b38e6d9584
2 changed files with 29 additions and 37 deletions

View file

@ -3,6 +3,27 @@
*
* Typemaps for constants
* ----------------------------------------------------------------------------- */
%typemap(classconsttab) int,
unsigned int,
short,
unsigned short,
long,
unsigned long,
unsigned char,
signed char,
enum SWIGTYPE
"zend_declare_class_constant_long($class_ce, \"$const_name\", sizeof(\"$const_name\") - 1, $value);";
%typemap(classconsttab) bool
"zend_declare_class_constant_bool($class_ce, \"$const_name\", sizeof(\"$const_name\") - 1, $value);";
%typemap(classconsttab) float,
double
"zend_declare_class_constant_double($class_ce, \"$const_name\", sizeof(\"$const_name\") - 1, $value);";
%typemap(classconsttab) char,
string
"zend_declare_class_constant_string($class_ce, \"$const_name\", sizeof(\"$const_name\") - 1, \"$value\");";
%typemap(consttab) int,
unsigned int,