Usermode/SpiderScript - Added language namespace exports
[tpg/acess2.git] / Usermode / include / spiderscript.h
index 92e6c13..e049730 100644 (file)
@@ -65,6 +65,10 @@ enum eSpiderScript_DataTypes
        NUM_SS_DATATYPES
 };
 
+#define SS_MAKEARRAY(_type)    ((_type) + 0x10000)
+#define SS_DOWNARRAY(_type)    ((_type) - 0x10000)
+#define SS_GETARRAYDEPTH(_type)        ((_type) >> 16)
+
 enum eSpiderValueOps
 {
        SS_VALUEOP_NOP,
@@ -236,6 +240,12 @@ struct sSpiderFunction
         * \brief Function handler
         */
        tSpiderValue    *(*Handler)(tSpiderScript *Script, int nParams, tSpiderValue **Parameters);
+
+       /**
+        * \brief What type is returned
+        */
+        int    ReturnType;     
+
        /**
         * \brief Argument types
         * 
@@ -263,8 +273,9 @@ extern tSpiderScript        *SpiderScript_ParseFile(tSpiderVariant *Variant, const char
  * \return Return value
  */
 extern tSpiderValue    *SpiderScript_ExecuteFunction(tSpiderScript *Script,
-       tSpiderNamespace *Namespace, const char *Function,
-       int NArguments, tSpiderValue **Arguments
+       const char *Function, const char *DefaultNamespaces[],
+       int NArguments, tSpiderValue **Arguments,
+       void **FunctionIdent
        );
 /**
  * \brief Execute an object method
@@ -277,7 +288,7 @@ extern tSpiderValue *SpiderScript_ExecuteMethod(tSpiderScript *Script,
  * \brief Creates an object instance
  */
 extern tSpiderValue    *SpiderScript_CreateObject(tSpiderScript *Script,
-       tSpiderNamespace *Namespace, const char *ClassName,
+       const char *ClassName, const char *DefaultNamespaces[],
        int NArguments, tSpiderValue **Arguments
        );
 

UCC git Repository :: git.ucc.asn.au