/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
*/
#if LUA_VERSION_NUM > 503 #define lua_resume(a,b,c) lua_resume(a, NULL, b, c) #else /* ### For version < 5.4, assume that exactly one stack item is on the
* stack, which is what the code did before but seems dubious. */ #define lua_resume(a,b,c) (*(c) = 1, lua_resume(a, NULL, b)) #endif
/* Create a set of AP_LUA_DECLARE(type), AP_LUA_DECLARE_NONSTD(type) and * AP_LUA_DECLARE_DATA with appropriate export and import tags for the platform
*/ #if !defined(WIN32) #define AP_LUA_DECLARE(type) type #define AP_LUA_DECLARE_NONSTD(type) type #define AP_LUA_DECLARE_DATA #elifdefined(AP_LUA_DECLARE_STATIC) #define AP_LUA_DECLARE(type) type __stdcall #define AP_LUA_DECLARE_NONSTD(type) type #define AP_LUA_DECLARE_DATA #elifdefined(AP_LUA_DECLARE_EXPORT) #define AP_LUA_DECLARE(type) __declspec(dllexport) type __stdcall #define AP_LUA_DECLARE_NONSTD(type) __declspec(dllexport) type #define AP_LUA_DECLARE_DATA __declspec(dllexport) #else #define AP_LUA_DECLARE(type) __declspec(dllimport) type __stdcall #define AP_LUA_DECLARE_NONSTD(type) __declspec(dllimport) type #define AP_LUA_DECLARE_DATA __declspec(dllimport) #endif
/** * make a userdata out of a C pointer, and vice versa * instead of using lightuserdata
*/ #ifndef lua_boxpointer #define lua_boxpointer(L,u) (*(void **)(lua_newuserdata(L, sizeof(void *))) = (u)) #define lua_unboxpointer(L,i) (*(void **)(lua_touserdata(L, i))) #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.