<commit_before>// Copyright 2013 The gl-rs developers. For a full listing of the authors,
// refer to the AUTHORS file at the top-level directory of this distribution.
//
// Licensed 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.

use std::io;

/// Converts a C style type definition to the Rust equivalent
pub fn to_rust_ty(ty: &str) -> &'static str {
    match ty {
        // gl.xml types
        "GLDEBUGPROC"               => "types::GLDEBUGPROC",
        "GLDEBUGPROCAMD"            => "types::GLDEBUGPROCAMD",
        "GLDEBUGPROCARB"            => "types::GLDEBUGPROCARB",
        "GLDEBUGPROCKHR"            => "types::GLDEBUGPROCKHR",
        "GLbitfield"                => "types::GLbitfield",
        "GLboolean"                 => "types::GLboolean",
        "GLbyte"                    => "types::GLbyte",
        "GLclampd"                  => "types::GLclampd",
        "GLclampf"                  => "types::GLclampf",
        "GLclampx"                  => "types::GLclampx",
        "GLdouble"                  => "types::GLdouble",
        "GLeglImageOES"             => "types::GLeglImageOES",
        "GLenum"                    => "types::GLenum",
        "GLfixed"                   => "types::GLfixed",
        "GLfloat"                   => "types::GLfloat",
        "GLhalfNV"                  => "types::GLhalfNV",
        "GLhandleARB"               => "types::GLhandleARB",
        "GLint"                     => "types::GLint",
        "GLint64EXT"                => "types::GLint64EXT",
        "GLintptr"                  => "types::GLintptr",
        "GLintptrARB"               => "types::GLintptrARB",
        "GLshort"                   => "types::GLshort",
        "GLsizei"                   => "types::GLsizei",
        "GLsizeiptr"                => "types::GLsizeiptr",
        "GLsizeiptrARB"             => "types::GLsizeiptrARB",
        "GLsync"                    => "types::GLsync",
        "GLubyte"                   => "types::GLubyte",
        "GLuint"                    => "types::GLuint",
        "GLuint64"                  => "types::GLuint64",
        "GLuint64EXT"               => "types::GLuint64EXT",
        "GLushort"                  => "types::GLushort",
        "GLvdpauSurfaceNV"          => "types::GLvdpauSurfaceNV",
        "void "                     => "__gl_imports::libc::c_void",
        "GLboolean *"               => "*mut types::GLboolean",
        "GLchar *"                  => "*mut types::GLchar",
        "GLcharARB *"               => "*mut types::GLcharARB",
        "GLdouble *"                => "*mut types::GLdouble",
        "GLenum *"                  => "*mut types::GLenum",
        "GLfixed *"                 => "*mut types::GLfixed",
        "GLfloat *"                 => "*mut types::GLfloat",
        "GLhandleARB *"             => "*mut types::GLhandleARB",
        "GLint *"                   => "*mut types::GLint",
        "GLint64 *"                 => "*mut types::GLint64",
        "GLint64EXT *"              => "*mut types::GLint64EXT",
        "GLsizei *"                 => "*mut types::GLsizei",
        "GLubyte *"                 => "*mut types::GLubyte",
        "GLuint *"                  => "*mut types::GLuint",
        "GLuint [2]"                => "*mut [types::GLuint; 2]",
        "GLuint64 *"                => "*mut types::GLuint64",
        "GLuint64EXT *"             => "*mut types::GLuint64EXT",
        "GLushort *"                => "*mut types::GLushort",
        "GLvoid *"                  => "*mut types::GLvoid",
        "GLvoid **"                 => "*const *mut types::GLvoid",
        "void *"                    => "*mut __gl_imports::libc::c_void",
        "void **"                   => "*const *mut __gl_imports::libc::c_void",
        "const GLboolean *"         => "*const types::GLboolean",
        "const GLbyte *"            => "*const types::GLbyte",
        "const GLchar *"            => "*const types::GLchar",
        "const GLcharARB *"         => "*const types::GLcharARB",
        "const GLclampf *"          => "*const types::GLclampf",
        "const GLdouble *"          => "*const types::GLdouble",
        "const GLenum *"            => "*const types::GLenum",
        "const GLfixed *"           => "*const types::GLfixed",
        "const GLfloat"             => "types::GLfloat",
        "const GLfloat *"           => "*const types::GLfloat",
        "const GLhalfNV *"          => "*const types::GLhalfNV",
        "const GLint *"             => "*const types::GLint",
        "const GLint64EXT *"        => "*const types::GLint64EXT",
        "const GLintptr *"          => "*const types::GLintptr",
        "const GLshort *"           => "*const types::GLshort",
        "const GLsizei *"           => "*const types::GLsizei",
        "const GLsizeiptr *"        => "*const types::GLsizeiptr",
        "const GLubyte *"           => "*const types::GLubyte",
        "const GLuint *"            => "*const types::GLuint",
        "const GLuint64 *"          => "*const types::GLuint64",<commit_msg>Added type conversions for GLint64<commit_after>// Copyright 2013 The gl-rs developers. For a full listing of the authors,
// refer to the AUTHORS file at the top-level directory of this distribution.
//
// Licensed 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.

use std::io;

/// Converts a C style type definition to the Rust equivalent
pub fn to_rust_ty(ty: &str) -> &'static str {
    match ty {
        // gl.xml types
        "GLDEBUGPROC"               => "types::GLDEBUGPROC",
        "GLDEBUGPROCAMD"            => "types::GLDEBUGPROCAMD",
        "GLDEBUGPROCARB"            => "types::GLDEBUGPROCARB",
        "GLDEBUGPROCKHR"            => "types::GLDEBUGPROCKHR",
        "GLbitfield"                => "types::GLbitfield",
        "GLboolean"                 => "types::GLboolean",
        "GLbyte"                    => "types::GLbyte",
        "GLclampd"                  => "types::GLclampd",
        "GLclampf"                  => "types::GLclampf",
        "GLclampx"                  => "types::GLclampx",
        "GLdouble"                  => "types::GLdouble",
        "GLeglImageOES"             => "types::GLeglImageOES",
        "GLenum"                    => "types::GLenum",
        "GLfixed"                   => "types::GLfixed",
        "GLfloat"                   => "types::GLfloat",
        "GLhalfNV"                  => "types::GLhalfNV",
        "GLhandleARB"               => "types::GLhandleARB",
        "GLint"                     => "types::GLint",
        "GLint64"                   => "types::GLint64",
        "GLint64EXT"                => "types::GLint64EXT",
        "GLintptr"                  => "types::GLintptr",
        "GLintptrARB"               => "types::GLintptrARB",
        "GLshort"                   => "types::GLshort",
        "GLsizei"                   => "types::GLsizei",
        "GLsizeiptr"                => "types::GLsizeiptr",
        "GLsizeiptrARB"             => "types::GLsizeiptrARB",
        "GLsync"                    => "types::GLsync",
        "GLubyte"                   => "types::GLubyte",
        "GLuint"                    => "types::GLuint",
        "GLuint64"                  => "types::GLuint64",
        "GLuint64EXT"               => "types::GLuint64EXT",
        "GLushort"                  => "types::GLushort",
        "GLvdpauSurfaceNV"          => "types::GLvdpauSurfaceNV",
        "void "                     => "__gl_imports::libc::c_void",
        "GLboolean *"               => "*mut types::GLboolean",
        "GLchar *"                  => "*mut types::GLchar",
        "GLcharARB *"               => "*mut types::GLcharARB",
        "GLdouble *"                => "*mut types::GLdouble",
        "GLenum *"                  => "*mut types::GLenum",
        "GLfixed *"                 => "*mut types::GLfixed",
        "GLfloat *"                 => "*mut types::GLfloat",
        "GLhandleARB *"             => "*mut types::GLhandleARB",
        "GLint *"                   => "*mut types::GLint",
        "GLint64 *"                 => "*mut types::GLint64",
        "GLint64EXT *"              => "*mut types::GLint64EXT",
        "GLsizei *"                 => "*mut types::GLsizei",
        "GLubyte *"                 => "*mut types::GLubyte",
        "GLuint *"                  => "*mut types::GLuint",
        "GLuint [2]"                => "*mut [types::GLuint; 2]",
        "GLuint64 *"                => "*mut types::GLuint64",
        "GLuint64EXT *"             => "*mut types::GLuint64EXT",
        "GLushort *"                => "*mut types::GLushort",
        "GLvoid *"                  => "*mut types::GLvoid",
        "GLvoid **"                 => "*const *mut types::GLvoid",
        "void *"                    => "*mut __gl_imports::libc::c_void",
        "void **"                   => "*const *mut __gl_imports::libc::c_void",
        "const GLboolean *"         => "*const types::GLboolean",
        "const GLbyte *"            => "*const types::GLbyte",
        "const GLchar *"            => "*const types::GLchar",
        "const GLcharARB *"         => "*const types::GLcharARB",
        "const GLclampf *"          => "*const types::GLclampf",
        "const GLdouble *"          => "*const types::GLdouble",
        "const GLenum *"            => "*const types::GLenum",
        "const GLfixed *"           => "*const types::GLfixed",
        "const GLfloat"             => "types::GLfloat",
        "const GLfloat *"           => "*const types::GLfloat",
        "const GLhalfNV *"          => "*const types::GLhalfNV",
        "const GLint *"             => "*const types::GLint",
        "const GLint64 *"           => "*const types::GLint64",
        "const GLint64EXT *"        => "*const types::GLint64EXT",
        "const GLintptr *"          => "*const types::GLintptr",
        "const GLshort *"           => "*const types::GLshort",
        "const GLsizei *"           => "*const types::GLsizei",
        "const GLsizeiptr *"        => "*const types::GLsizeiptr",
        "const GLubyte *"           => "*const types::GLubyte",
        "const GLuint *"            => "*const types::GLuint",
        "const GLuint64 *"          => "*const types::GLuint64",
{'fraction_non_alphanumeric': 0.15267175572519084, 'fraction_numerical': 0.009053790165098526, 'mean_word_length': 1.5228392297357816, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 157, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 2}, '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': '2335763', 'n_tokens_mistral': 3172, 'n_tokens_neox': 3070, 'n_words': 689}