Browse Source

Keeping up to date

Eiyeron Fulmincendii 9 years ago
parent
commit
1f6b6fe35f

+ 3 - 3
doc/source/reference/api/object_manipulation.rst

@@ -91,7 +91,7 @@ resizes the array at the position idx in the stack.
     :returns: a SQRESULT
     :returns: a SQRESULT
     :remarks: Only works on arrays.
     :remarks: Only works on arrays.
 
 
-reverse an array in place.
+reverses an array in place.
 
 
 
 
 
 
@@ -106,7 +106,7 @@ reverse an array in place.
     :returns: a SQRESULT
     :returns: a SQRESULT
     :remarks: Only works on tables and arrays.
     :remarks: Only works on tables and arrays.
 
 
-clears all the element of the table/array at position idx in the stack.
+clears all the elements of the table/array at position idx in the stack.
 
 
 
 
 
 
@@ -120,7 +120,7 @@ clears all the element of the table/array at position idx in the stack.
     :param SQInteger idx: index of the target object in the stack
     :param SQInteger idx: index of the target object in the stack
     :returns: a SQRESULT
     :returns: a SQRESULT
 
 
-Clones the table, array or class instance at the position idx, clones it and pushes the new object in the stack.
+pushes a clone of the table, array, or class instance at the position idx.
 
 
 
 
 
 

+ 1 - 1
doc/source/reference/language/builtin_functions.rst

@@ -105,7 +105,7 @@ returns the stack informations of a given call stack level. returns a table form
         }
         }
     }
     }
 
 
-level = 0 is the current function, level = 1 is the caller and so on. If the stack level doesn't exist the function returns null.
+level = 0 is getstackinfos() itself! level = 1 is the current function, level = 2 is the caller of the current function, and so on. If the stack level doesn't exist the function returns null.
 
 
 .. js:function:: newthread(threadfunc)
 .. js:function:: newthread(threadfunc)
 
 

+ 2 - 2
doc/source/reference/language/classes.rst

@@ -46,7 +46,7 @@ For instance: ::
 
 
     }
     }
 
 
-the previous code examples is a syntactic sugar for: ::
+the previous code example is a syntactic sugar for: ::
 
 
     Foo <- class {
     Foo <- class {
         //constructor
         //constructor
@@ -67,7 +67,7 @@ the previous code examples is a syntactic sugar for: ::
 
 
     }
     }
 
 
-in order to emulate namespaces, is also possible to declare something like this::
+in order to emulate namespaces, it is also possible to declare something like this::
 
 
     //just 2 regular nested tables
     //just 2 regular nested tables
     FakeNamespace <- {
     FakeNamespace <- {

+ 6 - 6
doc/source/reference/language/expressions.rst

@@ -221,10 +221,10 @@ Bitwise Operators
     exp:= 'exp' op 'exp'
     exp:= 'exp' op 'exp'
     exp := '~' exp
     exp := '~' exp
 
 
-Squirrel supports the standard c-like bit wise operators ``&, |, ^, ~, <<, >>`` plus the unsigned
-right shift operator ``<<<``. The unsigned right shift works exactly like the normal right shift operator(``<<``)
+Squirrel supports the standard C-like bitwise operators ``&, |, ^, ~, <<, >>`` plus the unsigned
+right shift operator ``>>>``. The unsigned right shift works exactly like the normal right shift operator(``>>``)
 except for treating the left operand as an unsigned integer, so is not affected by the sign. Those operators
 except for treating the left operand as an unsigned integer, so is not affected by the sign. Those operators
-only work on integers values, passing of any other operand type to these operators will
+only work on integer values; passing of any other operand type to these operators will
 cause an exception.
 cause an exception.
 
 
 ^^^^^^^^^^^^^^^^^^^^^
 ^^^^^^^^^^^^^^^^^^^^^
@@ -255,7 +255,7 @@ Operators precedence
 +---------------------------------------+-----------+
 +---------------------------------------+-----------+
 | ``+=, =, -=``                         | ...       |
 | ``+=, =, -=``                         | ...       |
 +---------------------------------------+-----------+
 +---------------------------------------+-----------+
-| ``,(comma operator)``                 | lowest    |
+| ``, (comma operator)``                | lowest    |
 +---------------------------------------+-----------+
 +---------------------------------------+-----------+
 
 
 .. _table_contructor:
 .. _table_contructor:
@@ -293,7 +293,7 @@ A new slot with exp1 as key and exp2 as value is created::
         [1]="I'm the value"
         [1]="I'm the value"
     }
     }
 
 
-both syntaxes can be mixed::
+Both syntaxes can be mixed::
 
 
     local table=
     local table=
     {
     {
@@ -369,6 +369,6 @@ Creates a new array.::
 
 
     a <- [] //creates an empty array
     a <- [] //creates an empty array
 
 
-arrays can be initialized with values during the construction::
+Arrays can be initialized with values during the construction::
 
 
     a <- [1,"string!",[],{}] //creates an array with 4 elements
     a <- [1,"string!",[],{}] //creates an array with 4 elements

+ 1 - 1
include/squirrel.h

@@ -396,7 +396,7 @@ SQUIRREL_API void sq_setnativedebughook(HSQUIRRELVM v,SQDEBUGHOOK hook);
 #ifdef __GNUC__
 #ifdef __GNUC__
 # define SQ_UNUSED_ARG(x) __attribute__((unused)) x
 # define SQ_UNUSED_ARG(x) __attribute__((unused)) x
 #else
 #else
-# define SQ_UNUSED_ARG(x) x
+# define SQ_UNUSED_ARG(x)
 #endif
 #endif
 
 
 #ifdef __cplusplus
 #ifdef __cplusplus

+ 0 - 1
sq/sq.c

@@ -68,7 +68,6 @@ void printfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
     scvprintf(stdout, s, vl);
     scvprintf(stdout, s, vl);
 #endif
 #endif
     va_end(vl);
     va_end(vl);
-    (void)v; /* UNUSED */
 }
 }
 
 
 void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)
 void errorfunc(HSQUIRRELVM SQ_UNUSED_ARG(v),const SQChar *s,...)

+ 4 - 4
squirrel/sqapi.cpp

@@ -510,7 +510,7 @@ SQRESULT sq_setclosureroot(HSQUIRRELVM v,SQInteger idx)
         v->Pop();
         v->Pop();
         return SQ_OK;
         return SQ_OK;
     }
     }
-    return sq_throwerror(v, _SC("ivalid type"));
+    return sq_throwerror(v, _SC("invalid type"));
 }
 }
 
 
 SQRESULT sq_getclosureroot(HSQUIRRELVM v,SQInteger idx)
 SQRESULT sq_getclosureroot(HSQUIRRELVM v,SQInteger idx)
@@ -558,7 +558,7 @@ SQRESULT sq_setroottable(HSQUIRRELVM v)
         v->Pop();
         v->Pop();
         return SQ_OK;
         return SQ_OK;
     }
     }
-    return sq_throwerror(v, _SC("ivalid type"));
+    return sq_throwerror(v, _SC("invalid type"));
 }
 }
 
 
 SQRESULT sq_setconsttable(HSQUIRRELVM v)
 SQRESULT sq_setconsttable(HSQUIRRELVM v)
@@ -569,7 +569,7 @@ SQRESULT sq_setconsttable(HSQUIRRELVM v)
         v->Pop();
         v->Pop();
         return SQ_OK;
         return SQ_OK;
     }
     }
-    return sq_throwerror(v, _SC("ivalid type, expected table"));
+    return sq_throwerror(v, _SC("invalid type, expected table"));
 }
 }
 
 
 void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p)
 void sq_setforeignptr(HSQUIRRELVM v,SQUserPointer p)
@@ -1164,7 +1164,7 @@ SQRESULT sq_call(HSQUIRRELVM v,SQInteger params,SQBool retval,SQBool raiseerror)
     if(v->Call(v->GetUp(-(params+1)),params,v->_top-params,res,raiseerror?true:false)){
     if(v->Call(v->GetUp(-(params+1)),params,v->_top-params,res,raiseerror?true:false)){
 
 
         if(!v->_suspended) {
         if(!v->_suspended) {
-            v->Pop(params);//pop closure and args
+            v->Pop(params);//pop args
         }
         }
         if(retval){
         if(retval){
             v->Push(res); return SQ_OK;
             v->Push(res); return SQ_OK;

+ 1 - 1
squirrel/sqclass.cpp

@@ -189,7 +189,7 @@ SQInstance::~SQInstance()
     if(_class){ Finalize(); } //if _class is null it was already finalized by the GC
     if(_class){ Finalize(); } //if _class is null it was already finalized by the GC
 }
 }
 
 
-bool SQInstance::GetMetaMethod(SQVM SQ_UNUSED_ARG(*v),SQMetaMethod mm,SQObjectPtr &res)
+bool SQInstance::GetMetaMethod(SQVM* SQ_UNUSED_ARG(v),SQMetaMethod mm,SQObjectPtr &res)
 {
 {
     if(type(_class->_metamethods[mm]) != OT_NULL) {
     if(type(_class->_metamethods[mm]) != OT_NULL) {
         res = _class->_metamethods[mm];
         res = _class->_metamethods[mm];

+ 1 - 1
squirrel/sqstate.cpp

@@ -241,7 +241,7 @@ void SQSharedState::MarkObject(SQObjectPtr &o,SQCollectable **chain)
     }
     }
 }
 }
 
 
-void SQSharedState::RunMark(SQVM SQ_UNUSED_ARG(*vm),SQCollectable **tchain)
+void SQSharedState::RunMark(SQVM* SQ_UNUSED_ARG(vm),SQCollectable **tchain)
 {
 {
     SQVM *vms = _thread(_root_vm);
     SQVM *vms = _thread(_root_vm);