]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix syntax typo in isolating extensions doc (#103516)
authorAN Long <aisk@users.noreply.github.com>
Fri, 14 Apr 2023 07:40:25 +0000 (15:40 +0800)
committerGitHub <noreply@github.com>
Fri, 14 Apr 2023 07:40:25 +0000 (00:40 -0700)
Doc/howto/isolating-extensions.rst

index 2eddb582da7c248b455768e516125f6bdf352143..0262054ae2b4a075898c81abcaf45b82aa862992 100644 (file)
@@ -372,7 +372,7 @@ To save a some tedious error-handling boilerplate code, you can combine
 these two steps with :c:func:`PyType_GetModuleState`, resulting in::
 
    my_struct *state = (my_struct*)PyType_GetModuleState(type);
-   if (state === NULL) {
+   if (state == NULL) {
        return NULL;
    }
 
@@ -435,7 +435,7 @@ For example::
            PyObject *kwnames)
    {
        my_struct *state = (my_struct*)PyType_GetModuleState(defining_class);
-       if (state === NULL) {
+       if (state == NULL) {
            return NULL;
        }
        ... // rest of logic
@@ -479,7 +479,7 @@ to get the state::
 
     PyObject *module = PyType_GetModuleByDef(Py_TYPE(self), &module_def);
     my_struct *state = (my_struct*)PyModule_GetState(module);
-    if (state === NULL) {
+    if (state == NULL) {
         return NULL;
     }