-rw-r--r-- | scripts/kconfig/kconfig.i | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/kconfig/kconfig.i b/scripts/kconfig/kconfig.i index 699cb13..77405fc 100644 --- a/scripts/kconfig/kconfig.i +++ b/scripts/kconfig/kconfig.i @@ -2,64 +2,69 @@ %{ #include "kconfig_load.c" %} %init %{ kconfig_load(); %} %nodefault; #ifdef SWIGRUBY %typemap (out) char * { if ($1 == NULL) $result = Qnil; else $result = rb_str_new2($1); } %typemap (in) char * { if ($input == Qnil) $1 = NULL; else $1 = STR2CSTR($input); } %{ static void expr_to_s_help(void *data, const char *str) { rb_str_cat((VALUE)data, str, strlen(str)); } %} #endif +#ifdef SWIGPYTHON +%rename (Property) property; +%rename (default) def; +#endif + %immutable; %include "expr.h" #define P(name,type,arg) extern type name arg %include "lkc_proto.h" %mutable; #ifdef SWIGRUBY %predicate menu::isVisible; %predicate symbol::isChangable; %predicate symbol::isChoice; %predicate symbol::isChoiceValue; #endif %extend menu { bool isVisible(void) { return menu_is_visible(self); } #ifdef SWIGRUBY void each(void) { struct menu *child; for (child = self->list; child; child = child->next) rb_yield(SWIG_NewPointerObj(child, SWIGTYPE_p_menu, 0)); } static void each_menu(void) { struct menu *child; for (child = rootmenu.list; child; child = child->next) rb_yield(SWIG_NewPointerObj(child, SWIGTYPE_p_menu, 0)); } #endif } %extend symbol { |