-void register_functions(HSQUIRRELVM v, WrappedFunction* functions);
-void register_classes(HSQUIRRELVM v, WrappedClass* classes);
-
-static inline void push_value(HSQUIRRELVM v, int val)
-{
- sq_pushinteger(v, val);
-}
-
-static inline void push_value(HSQUIRRELVM v, float val)
-{
- sq_pushfloat(v, val);
-}
-
-static inline void push_value(HSQUIRRELVM v, const char* str)
-{
- sq_pushstring(v, str, -1);
-}
-
-template<typename T>
-void _register_constants(HSQUIRRELVM v, WrappedConstant<T>* constants)
-{
- for(WrappedConstant<T>* c = constants; c->name != 0; ++c) {
- sq_pushstring(v, c->name, -1);
- push_value(v, c->value);
- if(sq_createslot(v, -3) < 0) {
- std::stringstream msg;
- msg << "Couldn't register int constant '" << c->name << "'";
- throw SquirrelError(v, msg.str());
- }
- }
-}
-
-template<typename T>
-void register_constants(HSQUIRRELVM v, WrappedConstant<T>* constants)
-{
- sq_pushroottable(v);
- _register_constants(v, constants);
- sq_pop(v, 1);
-}
-