commit 4486148959fde631e0ea9a3d55f4326820b63443 from: bigbes date: Fri Nov 13 12:35:51 2015 UTC Rename tarantool.h -> module.h commit - 69faa96ea83437acf88e707e3720eeb04fff91eb commit + 4486148959fde631e0ea9a3d55f4326820b63443 blob - b79c47df76797803d9d027a7d5e02929140da049 blob + 9e8bd54b54eab18c990b9301a6e2271122385e93 --- .gitignore +++ .gitignore @@ -49,7 +49,7 @@ src/box/bootstrap.h src/lua/*.lua.c src/box/lua/*.lua.c src/tarantool -src/trivia/tarantool.h +src/trivia/module.h tarantool-*.tar.gz test/lib/ test/unit/*.test blob - 2faa825ca61e4c77f1384f80f5c05633239e6ca9 blob + 79cf48ca8a2639d1ff2f718a90fb17939aa786e2 --- Doxyfile.API.in +++ Doxyfile.API.in @@ -1,5 +1,5 @@ @INCLUDE = @PROJECT_SOURCE_DIR@/Doxyfile -INPUT = @PROJECT_BINARY_DIR@/src/trivia/tarantool.h +INPUT = @PROJECT_BINARY_DIR@/src/trivia/module.h OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/doc/api/ ENABLED_SECTIONS = public DISABLE_INDEX = YES blob - fd3258d46fd1a09d051b363f457031505e22d468 blob + 6b33d62eebc48fbcdb7be41ad8e5cedbb1df9b89 --- FreeBSD/databases/tarantool/pkg-plist +++ FreeBSD/databases/tarantool/pkg-plist @@ -7,7 +7,7 @@ include/tarantool/lua.hpp include/tarantool/luaconf.h include/tarantool/luajit.h include/tarantool/lualib.h -include/tarantool/tarantool.h +include/tarantool/module.h man/man1/tarantool.1.gz man/man1/tarantoolctl.1.gz %%PORTDOCS%%%%DOCSDIR%%/LICENSE blob - 25cb8f4934ca5d650869ce533a2b80979f35c14e blob + 73bf2eb4e402778f8c3501f3a710e96d585d79ef --- cmake/module.cmake +++ cmake/module.cmake @@ -1,6 +1,6 @@ # A helper function to extract public API function(rebuild_module_api) - set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/tarantool.h") + set (dstfile "${CMAKE_CURRENT_BINARY_DIR}/module.h") set (tmpfile "${dstfile}.new") set (errcodefile "${CMAKE_CURRENT_BINARY_DIR}/errcode.i") set (headers) @@ -20,7 +20,7 @@ function(rebuild_module_api) set (cflags ${cflags} ${CMAKE_C_SYSROOT_FLAG} ${CMAKE_OSX_SYSROOT}) endif() add_custom_command(OUTPUT ${dstfile} - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/tarantool_header.h > ${tmpfile} + COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/module_header.h > ${tmpfile} COMMAND cat ${headers} | ${CMAKE_SOURCE_DIR}/extra/apigen >> ${tmpfile} COMMAND ${CMAKE_C_COMPILER} ${cflags} @@ -28,15 +28,15 @@ function(rebuild_module_api) -E ${CMAKE_SOURCE_DIR}/src/box/errcode.h > ${errcodefile} COMMAND grep "enum box_error_code" ${errcodefile} >> ${tmpfile} - COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/tarantool_footer.h >> ${tmpfile} + COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/module_footer.h >> ${tmpfile} COMMAND ${CMAKE_COMMAND} -E copy_if_different ${tmpfile} ${dstfile} COMMAND ${CMAKE_COMMAND} -E remove ${errcodefile} ${tmpfile} DEPENDS ${srcfiles} ${CMAKE_SOURCE_DIR}/src/box/errcode.h - ${CMAKE_CURRENT_SOURCE_DIR}/tarantool_header.h - ${CMAKE_CURRENT_SOURCE_DIR}/tarantool_footer.h + ${CMAKE_CURRENT_SOURCE_DIR}/module_header.h + ${CMAKE_CURRENT_SOURCE_DIR}/module_footer.h ) add_custom_target(api ALL DEPENDS ${srcfiles} ${dstfile}) install(FILES ${dstfile} DESTINATION ${MODULE_INCLUDEDIR}) endfunction() -set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/tarantool.h" PROPERTIES GENERATED HEADER_FILE_ONLY) +set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/module.h" PROPERTIES GENERATED HEADER_FILE_ONLY) blob - b4832ed084aad8d2cabba20e75bdec03221da7af blob + d04191754efcf503c0b312a00dfd32fcb169056b --- doc/sphinx/reference/capi.rst +++ doc/sphinx/reference/capi.rst @@ -2,5 +2,5 @@ Module C API ------------------------------------------------------------------------------- -.. doxygenfile:: tarantool.h +.. doxygenfile:: module.h :project: api blob - 9ee2d4bea1cbe7e79af807d0d2fd41c32abfb766 blob + 1e8ef35df230165b46213b393ab77a94ff0d4e1d --- extra/rpm/tarantool.rpm.spec.in +++ extra/rpm/tarantool.rpm.spec.in @@ -227,7 +227,7 @@ chkconfig --del tarantool "%{_includedir}/tarantool/lua.hpp" "%{_includedir}/tarantool/luajit.h" "%{_includedir}/tarantool/lualib.h" -"%{_includedir}/tarantool/tarantool.h" +"%{_includedir}/tarantool/module.h" %files common %defattr(-,root,root,-) blob - c5920a9f45b215cca06a73e608becd5641ba5a2c (mode 644) blob + /dev/null --- src/trivia/tarantool_footer.h +++ /dev/null @@ -1,5 +0,0 @@ -#if defined(__cplusplus) -} /* extern "C" */ -#endif /* defined(__cplusplus) */ - -#endif /* TARANTOOL_MODULE_H_INCLUDED */ blob - /dev/null blob + c5920a9f45b215cca06a73e608becd5641ba5a2c (mode 644) --- /dev/null +++ src/trivia/module_footer.h @@ -0,0 +1,5 @@ +#if defined(__cplusplus) +} /* extern "C" */ +#endif /* defined(__cplusplus) */ + +#endif /* TARANTOOL_MODULE_H_INCLUDED */ blob - 8e55e805b38d49272ad40579950f6db691f23be9 (mode 644) blob + /dev/null --- src/trivia/tarantool_header.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef TARANTOOL_MODULE_H_INCLUDED -#define TARANTOOL_MODULE_H_INCLUDED - -/** - * \file - */ - -#include -#include /* va_list */ -#include -#include /* strerror(3) */ -#include -#include -#include /* ssize_t */ - -/** Extern modifier for all public functions */ -#if defined(__cplusplus) -#define API_EXPORT extern "C" __attribute__ ((visibility ("default"))) -#else -#define API_EXPORT extern __attribute__ ((visibility ("default"))) -#endif - -#if defined(__cplusplus) -extern "C" { -#endif /* defined(__cplusplus) */ - -#include /* does not have extern C wrappers */ blob - /dev/null blob + 8e55e805b38d49272ad40579950f6db691f23be9 (mode 644) --- /dev/null +++ src/trivia/module_header.h @@ -0,0 +1,27 @@ +#ifndef TARANTOOL_MODULE_H_INCLUDED +#define TARANTOOL_MODULE_H_INCLUDED + +/** + * \file + */ + +#include +#include /* va_list */ +#include +#include /* strerror(3) */ +#include +#include +#include /* ssize_t */ + +/** Extern modifier for all public functions */ +#if defined(__cplusplus) +#define API_EXPORT extern "C" __attribute__ ((visibility ("default"))) +#else +#define API_EXPORT extern __attribute__ ((visibility ("default"))) +#endif + +#if defined(__cplusplus) +extern "C" { +#endif /* defined(__cplusplus) */ + +#include /* does not have extern C wrappers */ blob - cf5af20f2331d6fd59404d2f2c4a547608809fe8 blob + f12025201d3cda1ef90cba2e6ee919ed08518394 --- test/app/module_api.c +++ test/app/module_api.c @@ -1,5 +1,5 @@ #include -#include +#include #include blob - de9e07b9d5e088d21b5520d736f6204f075a3ec3 blob + a9693c6165422dc69c97e2d63f8fe8a4c025417f --- test/box/function1.c +++ test/box/function1.c @@ -1,5 +1,5 @@ #include -#include "tarantool.h" +#include "module.h" #include