PyAPI: update keyword list
authorCampbell Barton <ideasman42@gmail.com>
Sat, 10 Nov 2018 22:37:26 +0000 (09:37 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 10 Nov 2018 22:37:26 +0000 (09:37 +1100)
source/blender/editors/space_text/text_format_py.c
source/blender/makesrna/intern/rna_define.c
source/blender/python/intern/bpy_interface.c

index 3576d12998f9e7994dd765899fdab362dbce8789..50bad9c07cf9060f3bb63e41440b9ba3c11205ca 100644 (file)
@@ -62,6 +62,8 @@ static int txtfmt_py_find_builtinfunc(const char *string)
        if      (STR_LITERAL_STARTSWITH(string, "and",      len)) i = len;
        else if (STR_LITERAL_STARTSWITH(string, "as",       len)) i = len;
        else if (STR_LITERAL_STARTSWITH(string, "assert",   len)) i = len;
+       else if (STR_LITERAL_STARTSWITH(string, "async",    len)) i = len;
+       else if (STR_LITERAL_STARTSWITH(string, "await",    len)) i = len;
        else if (STR_LITERAL_STARTSWITH(string, "break",    len)) i = len;
        else if (STR_LITERAL_STARTSWITH(string, "continue", len)) i = len;
        else if (STR_LITERAL_STARTSWITH(string, "del",      len)) i = len;
index 697e23a414ac0d12bd04fc1539db1fab8b9a316f..d004491a33b67045394f1f19cd0fd22b6f43a339 100644 (file)
@@ -425,7 +425,7 @@ static int rna_validate_identifier(const char *identifier, char *error, bool pro
         */
        static const char *kwlist[] = {
                /* "False", "None", "True", */
-               "and", "as", "assert", "break",
+               "and", "as", "assert", "async", "await", "break",
                "class", "continue", "def", "del", "elif", "else", "except",
                "finally", "for", "from", "global", "if", "import", "in",
                "is", "lambda", "nonlocal", "not", "or", "pass", "raise",
index 0c7f3a7f68d267c1c00569085d39105ea5e4378f..1ae3106aa7653368574d44608414a4759b2a94f7 100644 (file)
@@ -1003,7 +1003,7 @@ bool BPY_string_is_keyword(const char *str)
         */
        const char *kwlist[] = {
            "False", "None", "True",
-           "and", "as", "assert", "break",
+           "and", "as", "assert", "async", "await", "break",
            "class", "continue", "def", "del", "elif", "else", "except",
            "finally", "for", "from", "global", "if", "import", "in",
            "is", "lambda", "nonlocal", "not", "or", "pass", "raise",