eolian: remove __builtin_free_cb
authorDaniel Kolesa <d.kolesa@samsung.com>
Thu, 1 Aug 2019 14:54:00 +0000 (16:54 +0200)
committerWooHyun Jung <wh0705.jung@samsung.com>
Mon, 5 Aug 2019 02:50:00 +0000 (11:50 +0900)
This has long been unused. If we need to replace this eventually,
it should be done correctly.

src/bindings/luajit/eolian.lua
src/lib/eolian/Eolian.h
src/lib/eolian/database_type.c
src/lib/eolian/database_validate.c
src/lib/eolian/eo_lexer.h
src/modules/evas/engines/gl_common/evas_gl_api.c
src/tests/eolian/data/typedef.eo
src/tests/eolian/data/typedef_ref.h
src/tests/eolian/data/typedef_ref_stub.h
src/tests/eolian/eolian_parsing.c

index 085f614..55ae838 100644 (file)
@@ -169,8 +169,7 @@ ffi.cdef [[
         EOLIAN_TYPE_BUILTIN_STRINGSHARE,
         EOLIAN_TYPE_BUILTIN_STRBUF,
 
-        EOLIAN_TYPE_BUILTIN_VOID_PTR,
-        EOLIAN_TYPE_BUILTIN_FREE_CB
+        EOLIAN_TYPE_BUILTIN_VOID_PTR
     } Eolian_Type_Builtin_Type;
 
     typedef enum {
@@ -973,8 +972,7 @@ M.type_builtin_type = {
    STRINGSHARE   = 46,
    STRBUF        = 47,
 
-   VOID_PTR      = 48,
-   FREE_CB       = 49
+   VOID_PTR      = 48
 }
 
 M.typedecl_type = {
index 4d74308..2c23da3 100644 (file)
@@ -348,8 +348,7 @@ typedef enum
    EOLIAN_TYPE_BUILTIN_STRINGSHARE,
    EOLIAN_TYPE_BUILTIN_STRBUF,
 
-   EOLIAN_TYPE_BUILTIN_VOID_PTR,
-   EOLIAN_TYPE_BUILTIN_FREE_CB
+   EOLIAN_TYPE_BUILTIN_VOID_PTR
 } Eolian_Type_Builtin_Type;
 
 typedef enum
index 66d8a97..b0d1ac1 100644 (file)
@@ -189,17 +189,6 @@ static void
 _atype_to_str(const Eolian_Typedecl *tp, Eina_Strbuf *buf)
 {
    eina_strbuf_append(buf, "typedef ");
-
-   if (tp->base_type->type == EOLIAN_TYPE_REGULAR)
-     {
-        if (!strcmp(tp->base_type->base.name, "__builtin_free_cb"))
-          {
-             eina_strbuf_append(buf, "void (*");
-             eina_strbuf_append(buf, tp->base.c_name);
-             eina_strbuf_append(buf, ")(void *data)");
-             return;
-          }
-     }
    database_type_to_str(tp->base_type, buf, tp->base.c_name,
                         EOLIAN_C_TYPE_DEFAULT);
 }
index c594572..1ca8240 100644 (file)
@@ -291,7 +291,6 @@ _validate_type(Validate_State *vals, Eolian_Type *tp)
                   {
                    case KW_void_ptr:
                    case KW___undefined_type:
-                   case KW___builtin_free_cb:
                      if (vals->stable)
                        {
                           _eo_parser_log(&tp->base,
index e2ce990..c70b1c9 100644 (file)
@@ -64,7 +64,6 @@ enum Tokens
     KW(mstring), KW(string), KW(stringshare), KW(strbuf), \
     \
     KW(void_ptr), \
-    KW(__builtin_free_cb), \
     KW(function), \
     KW(__undefined_type), \
     \
index 6c3a44a..249ddd8 100755 (executable)
@@ -865,58 +865,7 @@ _evgl_glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLi
            }
       }
 
-    _gles3_api.glFramebufferTexture(target, attachment, texture, level);
-}
-
-static void
-_evgl_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer)
-{
-    EVGL_Resource *rsc;
-    EVGL_Context *ctx;
-
-    if (!(rsc=_evgl_tls_resource_get()))
-      {
-         ERR("Unable to execute GL command. Error retrieving tls");
-         return;
-      }
-
-    if (!rsc->current_eng)
-      {
-         ERR("Unable to retrive Current Engine");
-         return;
-      }
-
-    ctx = rsc->current_ctx;
-    if (!ctx)
-      {
-         ERR("Unable to retrive Current Context");
-         return;
-      }
-
-    if (!_evgl_direct_enabled())
-      {
-         if (ctx->version == EVAS_GL_GLES_3_X)
-           {
-              if (target == GL_DRAW_FRAMEBUFFER || target == GL_FRAMEBUFFER)
-                {
-                   if (ctx->current_draw_fbo == 0)
-                     {
-                        SET_GL_ERROR(GL_INVALID_OPERATION);
-                        return;
-                     }
-                }
-              else if (target == GL_READ_FRAMEBUFFER)
-                {
-                   if (ctx->current_read_fbo == 0)
-                     {
-                        SET_GL_ERROR(GL_INVALID_OPERATION);
-                        return;
-                     }
-                }
-           }
-      }
-
-    _gles3_api.glFramebufferTextureLayer(target, attachment, texture, level, layer);
+   _gles3_api.glFramebufferTexture(target, attachment, texture, level);
 }
 
 
@@ -3209,6 +3158,111 @@ _normal_gles3_api_get(Evas_GL_API *funcs, int minor_version)
         ORD(glVertexAttribIFormat);
         ORD(glVertexAttribBinding);
         ORD(glVertexBindingDivisor);
+      case 0:
+        ORD(glBeginQuery);
+        ORD(glBeginTransformFeedback);
+        ORD(glBindBufferBase);
+        ORD(glBindBufferRange);
+        ORD(glBindSampler);
+        ORD(glBindTransformFeedback);
+        ORD(glBindVertexArray);
+        ORD(glBlitFramebuffer);
+        ORD(glClearBufferfi);
+        ORD(glClearBufferfv);
+        ORD(glClearBufferiv);
+        ORD(glClearBufferuiv);
+        ORD(glClientWaitSync);
+        ORD(glCompressedTexImage3D);
+        ORD(glCompressedTexSubImage3D);
+        ORD(glCopyBufferSubData);
+        ORD(glCopyTexSubImage3D);
+        ORD(glDeleteQueries);
+        ORD(glDeleteSamplers);
+        ORD(glDeleteSync);
+        ORD(glDeleteTransformFeedbacks);
+        ORD(glDeleteVertexArrays);
+        ORD(glDrawArraysInstanced);
+        ORD(glDrawBuffers);
+        ORD(glDrawElementsInstanced);
+        ORD(glDrawRangeElements);
+        ORD(glEndQuery);
+        ORD(glEndTransformFeedback);
+        ORD(glFenceSync);
+        ORD(glFlushMappedBufferRange);
+        ORD(glFramebufferTextureLayer);
+        ORD(glGenQueries);
+        ORD(glGenSamplers);
+        ORD(glGenTransformFeedbacks);
+        ORD(glGenVertexArrays);
+        ORD(glGetActiveUniformBlockiv);
+        ORD(glGetActiveUniformBlockName);
+        ORD(glGetActiveUniformsiv);
+        ORD(glGetBufferParameteri64v);
+        ORD(glGetBufferPointerv);
+        ORD(glGetFragDataLocation);
+        ORD(glGetInteger64i_v);
+        ORD(glGetInteger64v);
+        ORD(glGetIntegeri_v);
+        ORD(glGetInternalformativ);
+        ORD(glGetProgramBinary);
+        ORD(glGetQueryiv);
+        ORD(glGetQueryObjectuiv);
+        ORD(glGetSamplerParameterfv);
+        ORD(glGetSamplerParameteriv);
+        ORD(glGetStringi);
+        ORD(glGetSynciv);
+        ORD(glGetTransformFeedbackVarying);
+        ORD(glGetUniformBlockIndex);
+        ORD(glGetUniformIndices);
+        ORD(glGetUniformuiv);
+        ORD(glGetVertexAttribIiv);
+        ORD(glGetVertexAttribIuiv);
+        ORD(glInvalidateFramebuffer);
+        ORD(glInvalidateSubFramebuffer);
+        ORD(glIsQuery);
+        ORD(glIsSampler);
+        ORD(glIsSync);
+        ORD(glIsTransformFeedback);
+        ORD(glIsVertexArray);
+        ORD(glMapBufferRange);
+        ORD(glPauseTransformFeedback);
+        ORD(glProgramBinary);
+        ORD(glProgramParameteri);
+        ORD(glReadBuffer);
+        ORD(glRenderbufferStorageMultisample);
+        ORD(glResumeTransformFeedback);
+        ORD(glSamplerParameterf);
+        ORD(glSamplerParameterfv);
+        ORD(glSamplerParameteri);
+        ORD(glSamplerParameteriv);
+        ORD(glTexImage3D);
+        ORD(glTexStorage2D);
+        ORD(glTexStorage3D);
+        ORD(glTexSubImage3D);
+        ORD(glTransformFeedbackVaryings);
+        ORD(glUniform1ui);
+        ORD(glUniform1uiv);
+        ORD(glUniform2ui);
+        ORD(glUniform2uiv);
+        ORD(glUniform3ui);
+        ORD(glUniform3uiv);
+        ORD(glUniform4ui);
+        ORD(glUniform4uiv);
+        ORD(glUniformBlockBinding);
+        ORD(glUniformMatrix2x3fv);
+        ORD(glUniformMatrix3x2fv);
+        ORD(glUniformMatrix2x4fv);
+        ORD(glUniformMatrix4x2fv);
+        ORD(glUniformMatrix3x4fv);
+        ORD(glUniformMatrix4x3fv);
+        ORD(glUnmapBuffer);
+        ORD(glVertexAttribDivisor);
+        ORD(glVertexAttribI4i);
+        ORD(glVertexAttribI4iv);
+        ORD(glVertexAttribI4ui);
+        ORD(glVertexAttribI4uiv);
+        ORD(glVertexAttribIPointer);
+        ORD(glWaitSync);
      }
 
 #undef ORD
@@ -3591,6 +3645,111 @@ _debug_gles3_api_get(Evas_GL_API *funcs, int minor_version)
         ORD(glVertexAttribIFormat);
         ORD(glVertexAttribBinding);
         ORD(glVertexBindingDivisor);
+      case 0:
+        ORD(glBeginQuery);
+        ORD(glBeginTransformFeedback);
+        ORD(glBindBufferBase);
+        ORD(glBindBufferRange);
+        ORD(glBindSampler);
+        ORD(glBindTransformFeedback);
+        ORD(glBindVertexArray);
+        ORD(glBlitFramebuffer);
+        ORD(glClearBufferfi);
+        ORD(glClearBufferfv);
+        ORD(glClearBufferiv);
+        ORD(glClearBufferuiv);
+        ORD(glClientWaitSync);
+        ORD(glCompressedTexImage3D);
+        ORD(glCompressedTexSubImage3D);
+        ORD(glCopyBufferSubData);
+        ORD(glCopyTexSubImage3D);
+        ORD(glDeleteQueries);
+        ORD(glDeleteSamplers);
+        ORD(glDeleteSync);
+        ORD(glDeleteTransformFeedbacks);
+        ORD(glDeleteVertexArrays);
+        ORD(glDrawArraysInstanced);
+        ORD(glDrawBuffers);
+        ORD(glDrawElementsInstanced);
+        ORD(glDrawRangeElements);
+        ORD(glEndQuery);
+        ORD(glEndTransformFeedback);
+        ORD(glFenceSync);
+        ORD(glFlushMappedBufferRange);
+        ORD(glFramebufferTextureLayer);
+        ORD(glGenQueries);
+        ORD(glGenSamplers);
+        ORD(glGenTransformFeedbacks);
+        ORD(glGenVertexArrays);
+        ORD(glGetActiveUniformBlockiv);
+        ORD(glGetActiveUniformBlockName);
+        ORD(glGetActiveUniformsiv);
+        ORD(glGetBufferParameteri64v);
+        ORD(glGetBufferPointerv);
+        ORD(glGetFragDataLocation);
+        ORD(glGetInteger64i_v);
+        ORD(glGetInteger64v);
+        ORD(glGetIntegeri_v);
+        ORD(glGetInternalformativ);
+        ORD(glGetProgramBinary);
+        ORD(glGetQueryiv);
+        ORD(glGetQueryObjectuiv);
+        ORD(glGetSamplerParameterfv);
+        ORD(glGetSamplerParameteriv);
+        ORD(glGetStringi);
+        ORD(glGetSynciv);
+        ORD(glGetTransformFeedbackVarying);
+        ORD(glGetUniformBlockIndex);
+        ORD(glGetUniformIndices);
+        ORD(glGetUniformuiv);
+        ORD(glGetVertexAttribIiv);
+        ORD(glGetVertexAttribIuiv);
+        ORD(glInvalidateFramebuffer);
+        ORD(glInvalidateSubFramebuffer);
+        ORD(glIsQuery);
+        ORD(glIsSampler);
+        ORD(glIsSync);
+        ORD(glIsTransformFeedback);
+        ORD(glIsVertexArray);
+        ORD(glMapBufferRange);
+        ORD(glPauseTransformFeedback);
+        ORD(glProgramBinary);
+        ORD(glProgramParameteri);
+        ORD(glReadBuffer);
+        ORD(glRenderbufferStorageMultisample);
+        ORD(glResumeTransformFeedback);
+        ORD(glSamplerParameterf);
+        ORD(glSamplerParameterfv);
+        ORD(glSamplerParameteri);
+        ORD(glSamplerParameteriv);
+        ORD(glTexImage3D);
+        ORD(glTexStorage2D);
+        ORD(glTexStorage3D);
+        ORD(glTexSubImage3D);
+        ORD(glTransformFeedbackVaryings);
+        ORD(glUniform1ui);
+        ORD(glUniform1uiv);
+        ORD(glUniform2ui);
+        ORD(glUniform2uiv);
+        ORD(glUniform3ui);
+        ORD(glUniform3uiv);
+        ORD(glUniform4ui);
+        ORD(glUniform4uiv);
+        ORD(glUniformBlockBinding);
+        ORD(glUniformMatrix2x3fv);
+        ORD(glUniformMatrix3x2fv);
+        ORD(glUniformMatrix2x4fv);
+        ORD(glUniformMatrix4x2fv);
+        ORD(glUniformMatrix3x4fv);
+        ORD(glUniformMatrix4x3fv);
+        ORD(glUnmapBuffer);
+        ORD(glVertexAttribDivisor);
+        ORD(glVertexAttribI4i);
+        ORD(glVertexAttribI4iv);
+        ORD(glVertexAttribI4ui);
+        ORD(glVertexAttribI4uiv);
+        ORD(glVertexAttribIPointer);
+        ORD(glWaitSync);
      }
 
 #undef ORD
@@ -3846,6 +4005,111 @@ _evgl_load_gles3_apis(void *dl_handle, Evas_GL_API *funcs, int minor_version,
         ORD(glVertexAttribIFormat);
         ORD(glVertexAttribBinding);
         ORD(glVertexBindingDivisor);
+      case 0:
+        ORD(glBeginQuery);
+        ORD(glBeginTransformFeedback);
+        ORD(glBindBufferBase);
+        ORD(glBindBufferRange);
+        ORD(glBindSampler);
+        ORD(glBindTransformFeedback);
+        ORD(glBindVertexArray);
+        ORD(glBlitFramebuffer);
+        ORD(glClearBufferfi);
+        ORD(glClearBufferfv);
+        ORD(glClearBufferiv);
+        ORD(glClearBufferuiv);
+        ORD(glClientWaitSync);
+        ORD(glCompressedTexImage3D);
+        ORD(glCompressedTexSubImage3D);
+        ORD(glCopyBufferSubData);
+        ORD(glCopyTexSubImage3D);
+        ORD(glDeleteQueries);
+        ORD(glDeleteSamplers);
+        ORD(glDeleteSync);
+        ORD(glDeleteTransformFeedbacks);
+        ORD(glDeleteVertexArrays);
+        ORD(glDrawArraysInstanced);
+        ORD(glDrawBuffers);
+        ORD(glDrawElementsInstanced);
+        ORD(glDrawRangeElements);
+        ORD(glEndQuery);
+        ORD(glEndTransformFeedback);
+        ORD(glFenceSync);
+        ORD(glFlushMappedBufferRange);
+        ORD(glFramebufferTextureLayer);
+        ORD(glGenQueries);
+        ORD(glGenSamplers);
+        ORD(glGenTransformFeedbacks);
+        ORD(glGenVertexArrays);
+        ORD(glGetActiveUniformBlockiv);
+        ORD(glGetActiveUniformBlockName);
+        ORD(glGetActiveUniformsiv);
+        ORD(glGetBufferParameteri64v);
+        ORD(glGetBufferPointerv);
+        ORD(glGetFragDataLocation);
+        ORD(glGetInteger64i_v);
+        ORD(glGetInteger64v);
+        ORD(glGetIntegeri_v);
+        ORD(glGetInternalformativ);
+        ORD(glGetProgramBinary);
+        ORD(glGetQueryiv);
+        ORD(glGetQueryObjectuiv);
+        ORD(glGetSamplerParameterfv);
+        ORD(glGetSamplerParameteriv);
+        ORD(glGetStringi);
+        ORD(glGetSynciv);
+        ORD(glGetTransformFeedbackVarying);
+        ORD(glGetUniformBlockIndex);
+        ORD(glGetUniformIndices);
+        ORD(glGetUniformuiv);
+        ORD(glGetVertexAttribIiv);
+        ORD(glGetVertexAttribIuiv);
+        ORD(glInvalidateFramebuffer);
+        ORD(glInvalidateSubFramebuffer);
+        ORD(glIsQuery);
+        ORD(glIsSampler);
+        ORD(glIsSync);
+        ORD(glIsTransformFeedback);
+        ORD(glIsVertexArray);
+        ORD(glMapBufferRange);
+        ORD(glPauseTransformFeedback);
+        ORD(glProgramBinary);
+        ORD(glProgramParameteri);
+        ORD(glReadBuffer);
+        ORD(glRenderbufferStorageMultisample);
+        ORD(glResumeTransformFeedback);
+        ORD(glSamplerParameterf);
+        ORD(glSamplerParameterfv);
+        ORD(glSamplerParameteri);
+        ORD(glSamplerParameteriv);
+        ORD(glTexImage3D);
+        ORD(glTexStorage2D);
+        ORD(glTexStorage3D);
+        ORD(glTexSubImage3D);
+        ORD(glTransformFeedbackVaryings);
+        ORD(glUniform1ui);
+        ORD(glUniform1uiv);
+        ORD(glUniform2ui);
+        ORD(glUniform2uiv);
+        ORD(glUniform3ui);
+        ORD(glUniform3uiv);
+        ORD(glUniform4ui);
+        ORD(glUniform4uiv);
+        ORD(glUniformBlockBinding);
+        ORD(glUniformMatrix2x3fv);
+        ORD(glUniformMatrix3x2fv);
+        ORD(glUniformMatrix2x4fv);
+        ORD(glUniformMatrix4x2fv);
+        ORD(glUniformMatrix3x4fv);
+        ORD(glUniformMatrix4x3fv);
+        ORD(glUnmapBuffer);
+        ORD(glVertexAttribDivisor);
+        ORD(glVertexAttribI4i);
+        ORD(glVertexAttribI4iv);
+        ORD(glVertexAttribI4ui);
+        ORD(glVertexAttribI4uiv);
+        ORD(glVertexAttribIPointer);
+        ORD(glWaitSync);
      }
 #undef ORD
 
index ab4d991..2e01732 100644 (file)
@@ -8,8 +8,6 @@ type @extern Evas.Pants: float; /* not generated */
 
 type @beta Undef: __undefined_type; /* not generated */
 
-type @beta Free: __builtin_free_cb; /* specially generated */
-
 enum Enum.Bar
 {
    legacy: bar;
index c03f18c..24583b5 100644 (file)
@@ -19,10 +19,6 @@ typedef Evas_Coord Evas_Coord2;
 
 typedef Evas_Coord2 Evas_Coord3;
 
-#ifdef EFL_BETA_API_SUPPORT
-typedef void (*Free)(void *data);
-#endif /* EFL_BETA_API_SUPPORT */
-
 typedef enum
 {
   BAR_FIRST_ITEM = 0,
index 3bbb7d2..0f6f4ec 100644 (file)
@@ -11,9 +11,5 @@ typedef Evas_Coord Evas_Coord2;
 
 typedef Evas_Coord2 Evas_Coord3;
 
-#ifdef EFL_BETA_API_SUPPORT
-typedef void (*Free)(void *data);
-#endif /* EFL_BETA_API_SUPPORT */
-
 
 #endif
index f1294b7..7d680af 100644 (file)
@@ -402,8 +402,6 @@ EFL_START_TEST(eolian_typedef)
    fail_if(!eina_iterator_next(iter, (void**)&tdl));
    /* not generated undefined type, skip */
    fail_if(!eina_iterator_next(iter, (void**)&tdl));
-   /* free cb, tested by generation tests */
-   fail_if(!eina_iterator_next(iter, (void**)&tdl));
    fail_if(eina_iterator_next(iter, (void**)&tdl));
 
    eolian_state_free(eos);