<commit_before>#include "evas_gl_private.h"

#ifdef _WIN32
# define EFL_STDCALL __stdcall
#else
# define EFL_STDCALL
#endif

#define GLU_TESS

Evas_GL_Polygon *
evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y)
{
   Evas_GL_Polygon_Point *pt;

   if (!poly) poly = calloc(1, sizeof(Evas_GL_Polygon));
   if (!poly) return NULL;
   pt = calloc(1, sizeof(Evas_GL_Polygon_Point));
   if (!pt) return NULL;
   pt->x = x;
   pt->y = y;
   poly->points = eina_list_append(poly->points, pt);
   poly->changed = 1;
   return poly;
}

Evas_GL_Polygon *
evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly)
{
   if (!poly) return NULL;
   while (poly->points)
     {
	Evas_GL_Polygon_Point *pt;

	pt = poly->points->data;
	poly->points = eina_list_remove(poly->points, pt);
	free(pt);
     }
   if (poly->dl > 0) glDeleteLists(poly->dl, 1);
   free(poly);
   return NULL;
}

#ifdef GLU_TESS
static void EFL_STDCALL _evas_gl_tess_begin_cb(GLenum which);
static void EFL_STDCALL _evas_gl_tess_end_cb(void);
static void EFL_STDCALL _evas_gl_tess_error_cb(GLenum errorcode);
static void EFL_STDCALL _evas_gl_tess_vertex_cb(GLvoid *vertex);
static void EFL_STDCALL _evas_gl_tess_combine_cb(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **data_out);

static void
_evas_gl_tess_begin_cb(GLenum which)
{
   glBegin(which);
}

static void
_evas_gl_tess_end_cb(void)
{
   glEnd();
}

static void
_evas_gl_tess_error_cb(GLenum errorcode)
{
}

static void
_evas_gl_tess_vertex_cb(GLvoid *vertex)
{
   GLdouble *v;

   v = vertex;
   glVertex2d(v[0], v[1]);
}

static void
_evas_gl_tess_combine_cb(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **data_out)
{
   GLdouble *vertex;

   vertex = (GLdouble *) malloc(6 * sizeof(GLdouble));
   vertex[0] = coords[0];
   vertex[1] = coords[1];
   *data_out = vertex;<commit_msg>__stdcall must also be used in the definition of the callbacks<commit_after>#include "evas_gl_private.h"

#ifdef _WIN32
# define EFL_STDCALL __stdcall
#else
# define EFL_STDCALL
#endif

#define GLU_TESS

Evas_GL_Polygon *
evas_gl_common_poly_point_add(Evas_GL_Polygon *poly, int x, int y)
{
   Evas_GL_Polygon_Point *pt;

   if (!poly) poly = calloc(1, sizeof(Evas_GL_Polygon));
   if (!poly) return NULL;
   pt = calloc(1, sizeof(Evas_GL_Polygon_Point));
   if (!pt) return NULL;
   pt->x = x;
   pt->y = y;
   poly->points = eina_list_append(poly->points, pt);
   poly->changed = 1;
   return poly;
}

Evas_GL_Polygon *
evas_gl_common_poly_points_clear(Evas_GL_Polygon *poly)
{
   if (!poly) return NULL;
   while (poly->points)
     {
	Evas_GL_Polygon_Point *pt;

	pt = poly->points->data;
	poly->points = eina_list_remove(poly->points, pt);
	free(pt);
     }
   if (poly->dl > 0) glDeleteLists(poly->dl, 1);
   free(poly);
   return NULL;
}

#ifdef GLU_TESS
static void EFL_STDCALL _evas_gl_tess_begin_cb(GLenum which);
static void EFL_STDCALL _evas_gl_tess_end_cb(void);
static void EFL_STDCALL _evas_gl_tess_error_cb(GLenum errorcode);
static void EFL_STDCALL _evas_gl_tess_vertex_cb(GLvoid *vertex);
static void EFL_STDCALL _evas_gl_tess_combine_cb(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **data_out);

static void EFL_STDCALL
_evas_gl_tess_begin_cb(GLenum which)
{
   glBegin(which);
}

static void EFL_STDCALL
_evas_gl_tess_end_cb(void)
{
   glEnd();
}

static void EFL_STDCALL
_evas_gl_tess_error_cb(GLenum errorcode)
{
}

static void EFL_STDCALL
_evas_gl_tess_vertex_cb(GLvoid *vertex)
{
   GLdouble *v;

   v = vertex;
   glVertex2d(v[0], v[1]);
}

static void EFL_STDCALL
_evas_gl_tess_combine_cb(GLdouble coords[3], GLdouble *vertex_data[4], GLfloat weight[4], GLdouble **data_out)
{
   GLdouble *vertex;

   vertex = (GLdouble *) malloc(6 * sizeof(GLdouble));
   vertex[0] = coords[0];
   vertex[1] = coords[1];
   *data_out = vertex;
{'fraction_non_alphanumeric': 0.11770806326160228, 'fraction_numerical': 0.010889292196007259, 'mean_word_length': 5.242718446601942, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4377304', 'n_tokens_mistral': 1640, 'n_tokens_neox': 1618, 'n_words': 316}