summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/cpython/object.h1
-rw-r--r--Include/cpython/pyatomic.h3
-rw-r--r--Include/cpython/pyatomic_gcc.h4
-rw-r--r--Include/cpython/pyatomic_msc.h13
-rw-r--r--Include/cpython/pyatomic_std.h8
-rw-r--r--Include/internal/pycore_dict.h3
-rw-r--r--Include/internal/pycore_object.h1
7 files changed, 33 insertions, 0 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index c2830b7..e624326 100644
--- a/Include/cpython/object.h
+++ b/Include/cpython/object.h
@@ -275,6 +275,7 @@ typedef struct _heaptypeobject {
PyAPI_FUNC(const char *) _PyType_Name(PyTypeObject *);
PyAPI_FUNC(PyObject *) _PyType_Lookup(PyTypeObject *, PyObject *);
+PyAPI_FUNC(PyObject *) _PyType_LookupRef(PyTypeObject *, PyObject *);
PyAPI_FUNC(PyObject *) PyType_GetDict(PyTypeObject *);
PyAPI_FUNC(int) PyObject_Print(PyObject *, FILE *, int);
diff --git a/Include/cpython/pyatomic.h b/Include/cpython/pyatomic.h
index 69083f1..55a139b 100644
--- a/Include/cpython/pyatomic.h
+++ b/Include/cpython/pyatomic.h
@@ -485,6 +485,9 @@ static inline int
_Py_atomic_load_int_acquire(const int *obj);
static inline void
+_Py_atomic_store_uint32_release(uint32_t *obj, uint32_t value);
+
+static inline void
_Py_atomic_store_uint64_release(uint64_t *obj, uint64_t value);
static inline uint64_t
diff --git a/Include/cpython/pyatomic_gcc.h b/Include/cpython/pyatomic_gcc.h
index af78a94..c0f3747 100644
--- a/Include/cpython/pyatomic_gcc.h
+++ b/Include/cpython/pyatomic_gcc.h
@@ -517,6 +517,10 @@ _Py_atomic_load_int_acquire(const int *obj)
{ return __atomic_load_n(obj, __ATOMIC_ACQUIRE); }
static inline void
+_Py_atomic_store_uint32_release(uint32_t *obj, uint32_t value)
+{ __atomic_store_n(obj, value, __ATOMIC_RELEASE); }
+
+static inline void
_Py_atomic_store_uint64_release(uint64_t *obj, uint64_t value)
{ __atomic_store_n(obj, value, __ATOMIC_RELEASE); }
diff --git a/Include/cpython/pyatomic_msc.h b/Include/cpython/pyatomic_msc.h
index 212cd78..f32995c 100644
--- a/Include/cpython/pyatomic_msc.h
+++ b/Include/cpython/pyatomic_msc.h
@@ -990,6 +990,19 @@ _Py_atomic_load_int_acquire(const int *obj)
}
static inline void
+_Py_atomic_store_uint32_release(uint32_t *obj, uint32_t value)
+{
+#if defined(_M_X64) || defined(_M_IX86)
+ *(uint32_t volatile *)obj = value;
+#elif defined(_M_ARM64)
+ _Py_atomic_ASSERT_ARG_TYPE(unsigned __int32);
+ __stlr32((unsigned __int32 volatile *)obj, (unsigned __int32)value);
+#else
+# error "no implementation of _Py_atomic_store_uint32_release"
+#endif
+}
+
+static inline void
_Py_atomic_store_uint64_release(uint64_t *obj, uint64_t value)
{
#if defined(_M_X64) || defined(_M_IX86)
diff --git a/Include/cpython/pyatomic_std.h b/Include/cpython/pyatomic_std.h
index 6a77eae..0cdce4e 100644
--- a/Include/cpython/pyatomic_std.h
+++ b/Include/cpython/pyatomic_std.h
@@ -912,6 +912,14 @@ _Py_atomic_load_int_acquire(const int *obj)
}
static inline void
+_Py_atomic_store_uint32_release(uint32_t *obj, uint32_t value)
+{
+ _Py_USING_STD;
+ atomic_store_explicit((_Atomic(uint32_t)*)obj, value,
+ memory_order_release);
+}
+
+static inline void
_Py_atomic_store_uint64_release(uint64_t *obj, uint64_t value)
{
_Py_USING_STD;
diff --git a/Include/internal/pycore_dict.h b/Include/internal/pycore_dict.h
index f33026d..3ba8ee7 100644
--- a/Include/internal/pycore_dict.h
+++ b/Include/internal/pycore_dict.h
@@ -106,6 +106,9 @@ PyAPI_FUNC(PyObject *)_PyDict_LoadGlobal(PyDictObject *, PyDictObject *, PyObjec
/* Consumes references to key and value */
PyAPI_FUNC(int) _PyDict_SetItem_Take2(PyDictObject *op, PyObject *key, PyObject *value);
extern int _PyObjectDict_SetItem(PyTypeObject *tp, PyObject **dictptr, PyObject *name, PyObject *value);
+extern int _PyDict_SetItem_LockHeld(PyDictObject *dict, PyObject *name, PyObject *value);
+extern int _PyDict_GetItemRef_Unicode_LockHeld(PyDictObject *op, PyObject *key, PyObject **result);
+extern int _PyDict_GetItemRef_KnownHash(PyDictObject *op, PyObject *key, Py_hash_t hash, PyObject **result);
extern int _PyDict_Pop_KnownHash(
PyDictObject *dict,
diff --git a/Include/internal/pycore_object.h b/Include/internal/pycore_object.h
index 3b0222b..f15c332 100644
--- a/Include/internal/pycore_object.h
+++ b/Include/internal/pycore_object.h
@@ -658,6 +658,7 @@ extern PyObject *_PyType_NewManagedObject(PyTypeObject *type);
extern PyTypeObject* _PyType_CalculateMetaclass(PyTypeObject *, PyObject *);
extern PyObject* _PyType_GetDocFromInternalDoc(const char *, const char *);
extern PyObject* _PyType_GetTextSignatureFromInternalDoc(const char *, const char *, int);
+extern int _PyObject_SetAttributeErrorContext(PyObject *v, PyObject* name);
void _PyObject_InitInlineValues(PyObject *obj, PyTypeObject *tp);
extern int _PyObject_StoreInstanceAttribute(PyObject *obj,