<commit_before>package lua

import (
	"errors"
	"fmt"
	"syscall"
	"unsafe"
)

var luaDLL = syscall.NewLazyDLL("lua53.dll")

type Integer int64

func (value Integer) Push(L Lua) int {
	L.PushInteger(value)
	return 1
}

type Lua uintptr

var luaL_newstate = luaDLL.NewProc("luaL_newstate")

func New() (Lua, error) {
	if err := luaL_newstate.Find(); err != nil {
		return Lua(0), err
	}
	lua, _, _ := luaL_newstate.Call()
	return Lua(lua), nil
}

func (this Lua) State() uintptr {
	return uintptr(this)
}

var luaL_openlibs = luaDLL.NewProc("luaL_openlibs")

func (this Lua) OpenLibs() {
	luaL_openlibs.Call(this.State())
}

var lua_close = luaDLL.NewProc("lua_close")<commit_msg>Internal. Add constant `lua.NoInstance`<commit_after>package lua

import (
	"errors"
	"fmt"
	"syscall"
	"unsafe"
)

var luaDLL = syscall.NewLazyDLL("lua53.dll")

type Integer int64

func (value Integer) Push(L Lua) int {
	L.PushInteger(value)
	return 1
}

type Lua uintptr

const (
	NoInstance Lua = 0
)

var luaL_newstate = luaDLL.NewProc("luaL_newstate")

func New() (Lua, error) {
	if err := luaL_newstate.Find(); err != nil {
		return Lua(0), err
	}
	lua, _, _ := luaL_newstate.Call()
	return Lua(lua), nil
}

func (this Lua) State() uintptr {
	return uintptr(this)
}

var luaL_openlibs = luaDLL.NewProc("luaL_openlibs")

func (this Lua) OpenLibs() {
	luaL_openlibs.Call(this.State())
}

var lua_close = luaDLL.NewProc("lua_close")
{'fraction_non_alphanumeric': 0.14225053078556263, 'fraction_numerical': 0.009200283085633405, 'mean_word_length': 4.633466135458168, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2670872', 'n_tokens_mistral': 633, 'n_tokens_neox': 567, 'n_words': 132}