Merge branch 'master' of gitlab.com:gambas/gambas into exclamation-mark-completion
This commit is contained in:
commit
2701c6e0ab
6 changed files with 66 additions and 2 deletions
35
.gitignore
vendored
Normal file
35
.gitignore
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
Makefile
|
||||
Makefile.in
|
||||
libtool
|
||||
ltmain.sh
|
||||
stamp-h1
|
||||
warnings.log
|
||||
.deps/
|
||||
aclocal.m4
|
||||
config.guess
|
||||
config.log
|
||||
config.sub
|
||||
configure
|
||||
install-sh
|
||||
autom4te.cache
|
||||
config.h
|
||||
config.h.in
|
||||
config.status
|
||||
config.cache
|
||||
compile
|
||||
depcomp
|
||||
/m4/libtool.m4
|
||||
/m4/ltoptions.m4
|
||||
/m4/ltsugar.m4
|
||||
/m4/ltversion.m4
|
||||
/m4/lt~obsolete.m4
|
||||
.libs/
|
||||
*.la
|
||||
*.lo
|
||||
*.o
|
||||
*.a
|
||||
.dirstamp
|
||||
*_moc.cpp
|
||||
main/trunk_version.h
|
||||
main/*/gb*3
|
||||
|
4
README
4
README
|
@ -7,7 +7,7 @@ inspired by Visual Basic and Java.
|
|||
Go to http://gambas.sourceforge.net to get more information: how to compile
|
||||
and install it, where to find binary packages, how to report a bug...
|
||||
|
||||
Go to http://gambasdoc.org for language documentation.
|
||||
Go to http://gambaswiki.org for language documentation.
|
||||
|
||||
The following pieces of code were borrowed and adapted:
|
||||
|
||||
|
@ -35,4 +35,4 @@ If I forget some borrowed code in the list above, just tell me.
|
|||
Enjoy Gambas!
|
||||
|
||||
--
|
||||
Benoît
|
||||
Benoît
|
||||
|
|
|
@ -245,6 +245,7 @@ static char *array_from_dbus_type(const char *signature)
|
|||
|
||||
if (type_contents != type)
|
||||
strcpy(type, type_contents);
|
||||
GB.GetArrayClass(GB.FindClass(type));
|
||||
strcat(type, "[]");
|
||||
return type;
|
||||
}
|
||||
|
|
|
@ -131,6 +131,7 @@ const void *const GAMBAS_Api[] =
|
|||
(void *)GB_ExistClassLocal,
|
||||
(void *)CLASS_find,
|
||||
(void *)GB_GetArrayType,
|
||||
(void *)CLASS_get_array_class,
|
||||
(void *)GB_Is,
|
||||
(void *)GB_Ref,
|
||||
(void *)GB_Unref,
|
||||
|
|
|
@ -272,6 +272,30 @@ BEGIN_PROPERTY(Collection_Default)
|
|||
|
||||
END_PROPERTY
|
||||
|
||||
static void return_node_key(HASH_TABLE *hash_table, HASH_NODE *node)
|
||||
{
|
||||
char *key;
|
||||
int len;
|
||||
|
||||
HASH_TABLE_get_key(hash_table, node, &key, &len);
|
||||
if (len)
|
||||
GB_ReturnNewString(key, len);
|
||||
else
|
||||
GB_ReturnNull();
|
||||
|
||||
}
|
||||
|
||||
BEGIN_PROPERTY(Collection_First)
|
||||
|
||||
return_node_key(THIS->hash_table, THIS->hash_table->sfirst);
|
||||
|
||||
END_PROPERTY
|
||||
|
||||
BEGIN_PROPERTY(Collection_Last)
|
||||
|
||||
return_node_key(THIS->hash_table, THIS->hash_table->slast);
|
||||
|
||||
END_PROPERTY
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -285,6 +309,8 @@ GB_DESC NATIVE_Collection[] =
|
|||
|
||||
GB_PROPERTY_READ("Count", "i", Collection_Count),
|
||||
GB_PROPERTY_READ("Length", "i", Collection_Count),
|
||||
GB_PROPERTY_READ("First", "s", Collection_First),
|
||||
GB_PROPERTY_READ("Last", "s", Collection_Last),
|
||||
GB_PROPERTY("Key", "s", Collection_Key),
|
||||
GB_PROPERTY("Default", "v", Collection_Default),
|
||||
|
||||
|
|
|
@ -977,6 +977,7 @@ typedef
|
|||
bool (*ExistClassLocal)(const char *);
|
||||
GB_CLASS (*FindClassLocal)(const char *);
|
||||
GB_TYPE (*GetArrayType)(GB_CLASS);
|
||||
GB_CLASS (*GetArrayClass)(GB_CLASS);
|
||||
bool (*Is)(void *, GB_CLASS);
|
||||
void (*Ref)(void *);
|
||||
void (*Unref)(void **);
|
||||
|
|
Loading…
Reference in a new issue