mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
up
This commit is contained in:
parent
c5b263d5a8
commit
0a90998fe2
@ -17,9 +17,10 @@ The initial version. Hello, world!
|
||||
+ Fix a bug about comment and indentation
|
||||
+ Fix a bug about compile error line number
|
||||
|
||||
## 0.4.8+5
|
||||
## 0.4.8+6
|
||||
|
||||
+ Downgrade to `sdk>=2.17.0`
|
||||
+ Fix some bugs about compile error
|
||||
+ Fix a bug for jsonify `nan` or `inf`
|
||||
+ Add `math.isnan` and `math.isinf`
|
||||
+ Fix a bug of `__checkType`
|
@ -1,6 +1,6 @@
|
||||
name: pocketpy
|
||||
description: A lightweight Python interpreter for game engines.
|
||||
version: 0.4.8+5
|
||||
version: 0.4.8+6
|
||||
homepage: https://pocketpy.dev
|
||||
repository: https://github.com/blueloveth/pocketpy
|
||||
|
||||
|
@ -3077,6 +3077,7 @@ struct Py_ : PyObject {
|
||||
|
||||
#define UNION_GET(T, obj) (((Py_<T>*)((obj).get()))->_valueT)
|
||||
#define UNION_TP_NAME(obj) UNION_GET(_Str, (obj)->_typeName())
|
||||
#define UNION_NAME(obj) UNION_GET(_Str, (obj)->attribs[__name__])
|
||||
|
||||
|
||||
class RangeIterator : public BaseIterator {
|
||||
@ -4823,7 +4824,7 @@ public:
|
||||
|
||||
inline void __checkType(const PyVar& obj, const PyVar& type){
|
||||
#ifndef PKPY_NO_TYPE_CHECK
|
||||
if(!obj->isType(type)) typeError("expected '" + UNION_TP_NAME(type) + "', but got '" + UNION_TP_NAME(obj) + "'");
|
||||
if(!obj->isType(type)) typeError("expected '" + UNION_NAME(type) + "', but got '" + UNION_TP_NAME(obj) + "'");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit b1d3e4f63e539272d5b77bfb44ed8f5778efef9e
|
||||
Subproject commit eaeddb40e8691f6fbc8419da1d4996583aef07a8
|
@ -3077,6 +3077,7 @@ struct Py_ : PyObject {
|
||||
|
||||
#define UNION_GET(T, obj) (((Py_<T>*)((obj).get()))->_valueT)
|
||||
#define UNION_TP_NAME(obj) UNION_GET(_Str, (obj)->_typeName())
|
||||
#define UNION_NAME(obj) UNION_GET(_Str, (obj)->attribs[__name__])
|
||||
|
||||
|
||||
class RangeIterator : public BaseIterator {
|
||||
@ -4823,7 +4824,7 @@ public:
|
||||
|
||||
inline void __checkType(const PyVar& obj, const PyVar& type){
|
||||
#ifndef PKPY_NO_TYPE_CHECK
|
||||
if(!obj->isType(type)) typeError("expected '" + UNION_TP_NAME(type) + "', but got '" + UNION_TP_NAME(obj) + "'");
|
||||
if(!obj->isType(type)) typeError("expected '" + UNION_NAME(type) + "', but got '" + UNION_TP_NAME(obj) + "'");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -91,3 +91,4 @@ struct Py_ : PyObject {
|
||||
|
||||
#define UNION_GET(T, obj) (((Py_<T>*)((obj).get()))->_valueT)
|
||||
#define UNION_TP_NAME(obj) UNION_GET(_Str, (obj)->_typeName())
|
||||
#define UNION_NAME(obj) UNION_GET(_Str, (obj)->attribs[__name__])
|
2
src/vm.h
2
src/vm.h
@ -943,7 +943,7 @@ public:
|
||||
|
||||
inline void __checkType(const PyVar& obj, const PyVar& type){
|
||||
#ifndef PKPY_NO_TYPE_CHECK
|
||||
if(!obj->isType(type)) typeError("expected '" + UNION_TP_NAME(type) + "', but got '" + UNION_TP_NAME(obj) + "'");
|
||||
if(!obj->isType(type)) typeError("expected '" + UNION_NAME(type) + "', but got '" + UNION_TP_NAME(obj) + "'");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user