diff --git a/CHANGES.current b/CHANGES.current index 25052f208..46103f4ba 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,15 @@ Version 1.3.28 (unreleased). =========================== +01/12/2006: mmatus + - Add aliases for 'case' encoders used with %rename/%namewarn + + %(uppercase)s hello_world -> HELLO_WORLD + %(lowercase)s HelloWorld -> helloworld + %(camelcase)s hello_world -> HelloWorld + %(undercase)s HelloWorld -> hello_world + + 01/12/2006: mmatus - Add the -dump_parse_module and -dump_parse_top options, which are similar to -dump_module and -dump_top, but they diff --git a/Examples/test-suite/rename_camel.i b/Examples/test-suite/rename_camel.i index a2dc9ea2d..28eba3420 100644 --- a/Examples/test-suite/rename_camel.i +++ b/Examples/test-suite/rename_camel.i @@ -7,6 +7,7 @@ struct GeometryFactory { void createPointFromInternalCoord(int); + void BIG_METHOD(int); }; class ByteOrderValues { diff --git a/Source/Swig/misc.c b/Source/Swig/misc.c index 4ee6be8a3..38e0fea90 100644 --- a/Source/Swig/misc.c +++ b/Source/Swig/misc.c @@ -153,7 +153,7 @@ String *Swig_string_title(String *s) { } /* ----------------------------------------------------------------------------- - * Swig_string_ctitle() + * Swig_string_ccase() * * Takes a string object and returns a copy that is lowercase with thefirst letter * capitalized and the one following '_', which are removed. @@ -162,7 +162,7 @@ String *Swig_string_title(String *s) { * camelCase -> CamelCase * ----------------------------------------------------------------------------- */ -String *Swig_string_ctitle(String *s) { +String *Swig_string_ccase(String *s) { String *ns; int first = 1; int c; @@ -181,14 +181,14 @@ String *Swig_string_ctitle(String *s) { } /* ----------------------------------------------------------------------------- - * Swig_string_utitle() + * Swig_string_ucase() * - * This is the reverse case of ctitle, ie + * This is the reverse case of ccase, ie * * CamelCase -> camel_case * ----------------------------------------------------------------------------- */ -String *Swig_string_utitle(String *s) { +String *Swig_string_ucase(String *s) { String *ns; int first = 0; int c; @@ -725,12 +725,18 @@ Swig_init() { DohEncoding("upper", Swig_string_upper); DohEncoding("lower", Swig_string_lower); DohEncoding("title", Swig_string_title); - DohEncoding("ctitle", Swig_string_ctitle); - DohEncoding("utitle", Swig_string_utitle); + DohEncoding("ctitle", Swig_string_ccase); + DohEncoding("utitle", Swig_string_ucase); DohEncoding("typecode",Swig_string_typecode); DohEncoding("mangle",Swig_string_emangle); DohEncoding("command",Swig_string_command); + /* aliases for the case encoders */ + DohEncoding("uppercase", Swig_string_upper); + DohEncoding("lowercase", Swig_string_lower); + DohEncoding("camelcase", Swig_string_ccase); + DohEncoding("undercase", Swig_string_ucase); + /* Initialize the swig keys */ Swig_keys_init();