merge revisions 11243-11872 from trunk to gsoc2009-matevz
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@12162 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
commit
ab1cd03979
387 changed files with 12383 additions and 4412 deletions
|
|
@ -824,13 +824,15 @@ int SwigType_isfunction(SwigType *t) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
ParmList *SwigType_function_parms(SwigType *t) {
|
||||
/* Create a list of parameters from the type t, using the file_line_node Node for
|
||||
* file and line numbering for the parameters */
|
||||
ParmList *SwigType_function_parms(SwigType *t, Node *file_line_node) {
|
||||
List *l = SwigType_parmlist(t);
|
||||
Hash *p, *pp = 0, *firstp = 0;
|
||||
Iterator o;
|
||||
|
||||
for (o = First(l); o.item; o = Next(o)) {
|
||||
p = NewParm(o.item, 0);
|
||||
p = file_line_node ? NewParm(o.item, 0, file_line_node) : NewParmWithoutFileLineInfo(o.item, 0);
|
||||
if (!firstp)
|
||||
firstp = p;
|
||||
if (pp) {
|
||||
|
|
@ -893,11 +895,12 @@ SwigType *SwigType_add_template(SwigType *t, ParmList *parms) {
|
|||
* SwigType_templateprefix()
|
||||
*
|
||||
* Returns the prefix before the first template definition.
|
||||
* Returns the type unmodified if not a template.
|
||||
* For example:
|
||||
*
|
||||
* Foo<(p.int)>::bar
|
||||
*
|
||||
* returns "Foo"
|
||||
* Foo<(p.int)>::bar => Foo
|
||||
* r.q(const).Foo<(p.int)>::bar => r.q(const).Foo
|
||||
* Foo => Foo
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
String *SwigType_templateprefix(const SwigType *t) {
|
||||
|
|
@ -938,6 +941,25 @@ String *SwigType_templatesuffix(const SwigType *t) {
|
|||
return NewStringEmpty();
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SwigType_istemplate_templateprefix()
|
||||
*
|
||||
* Combines SwigType_istemplate and SwigType_templateprefix efficiently into one function.
|
||||
* Returns the prefix before the first template definition.
|
||||
* Returns NULL if not a template.
|
||||
* For example:
|
||||
*
|
||||
* Foo<(p.int)>::bar => Foo
|
||||
* r.q(const).Foo<(p.int)>::bar => r.q(const).Foo
|
||||
* Foo => NULL
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
String *SwigType_istemplate_templateprefix(const SwigType *t) {
|
||||
const char *s = Char(t);
|
||||
const char *c = strstr(s, "<(");
|
||||
return c ? NewStringWithSize(s, c - s) : 0;
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SwigType_templateargs()
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue