KrkGenericAlias → krk_GenericAlias for symbol name consistency

This commit is contained in:
K. Lange 2022-07-26 08:50:00 +09:00
parent dd621b94f2
commit b7f81d9239
5 changed files with 5 additions and 5 deletions

View File

@ -495,7 +495,7 @@ extern int krk_getAwaitable(void);
* Returns a generic alias object. Bind this to a class's \__class_getitem__
* to allow for generic collection types to be used in type hints.
*/
extern NativeFn KrkGenericAlias;
extern NativeFn krk_GenericAlias;
/**
* @brief Create a new, uninitialized code object.

View File

@ -563,7 +563,7 @@ void _createAndBind_dictClass(void) {
BIND_METHOD(dict,update);
krk_defineNative(&dict->methods, "__iter__", FUNC_NAME(dict,keys));
krk_defineNative(&dict->methods, "__str__", FUNC_NAME(dict,__repr__));
krk_defineNative(&dict->methods, "__class_getitem__", KrkGenericAlias)->obj.flags |= KRK_OBJ_FLAGS_FUNCTION_IS_CLASS_METHOD;
krk_defineNative(&dict->methods, "__class_getitem__", krk_GenericAlias)->obj.flags |= KRK_OBJ_FLAGS_FUNCTION_IS_CLASS_METHOD;
krk_attachNamedValue(&dict->methods, "__hash__", NONE_VAL());
krk_finalizeClass(dict);
KRK_DOC(dict, "Mapping of arbitrary keys to values.");

View File

@ -424,7 +424,7 @@ void _createAndBind_functionClass(void) {
BIND_PROP(function,__code__);
BIND_PROP(function,__globals__);
krk_defineNative(&function->methods, "__repr__", FUNC_NAME(function,__str__));
krk_defineNative(&function->methods, "__class_getitem__", KrkGenericAlias)->obj.flags |= KRK_OBJ_FLAGS_FUNCTION_IS_CLASS_METHOD;
krk_defineNative(&function->methods, "__class_getitem__", krk_GenericAlias)->obj.flags |= KRK_OBJ_FLAGS_FUNCTION_IS_CLASS_METHOD;
krk_finalizeClass(function);
KrkClass * method = ADD_BASE_CLASS(vm.baseClasses->methodClass, "method", vm.baseClasses->objectClass);

View File

@ -641,7 +641,7 @@ void _createAndBind_listClass(void) {
"Performs an in-place sort of the elements in the list, returning @c None as a gentle reminder "
"that the sort is in-place. If a sorted copy is desired, use @ref sorted instead.");
krk_defineNative(&list->methods, "__str__", FUNC_NAME(list,__repr__));
krk_defineNative(&list->methods, "__class_getitem__", KrkGenericAlias)->obj.flags |= KRK_OBJ_FLAGS_FUNCTION_IS_CLASS_METHOD;
krk_defineNative(&list->methods, "__class_getitem__", krk_GenericAlias)->obj.flags |= KRK_OBJ_FLAGS_FUNCTION_IS_CLASS_METHOD;
krk_attachNamedValue(&list->methods, "__hash__", NONE_VAL());
krk_finalizeClass(list);
KRK_DOC(list, "Mutable sequence of arbitrary values.");

View File

@ -64,4 +64,4 @@ KRK_Function(__class_getitem__) {
return finishStringBuilder(&sb);
}
NativeFn KrkGenericAlias = FUNC_NAME(krk,__class_getitem__);
NativeFn krk_GenericAlias = FUNC_NAME(krk,__class_getitem__);