<commit_before>#pragma once
#include "libnanyc.h"
#include <yuni/string.h>
#include <yuni/core/smartptr/intrusive.h>
#include "nany/nany.h"
#include "libnanyc-config.h"
#include <array>




namespace ny {

/*!
** \brief Definition of a single user-defined intrinsic
*/
struct Intrinsic final
	: public Yuni::IIntrusiveSmartPtr<Intrinsic, false, Yuni::Policy::SingleThreaded>
	, Yuni::NonCopyable<Intrinsic> {
public:
	Intrinsic(const AnyString& inname, void* callback)
		: callback(callback)
		, name(inname) {
		assert(inname.size() < name.chunkSize and "intrinsic name too long");
	}

	Intrinsic(const Intrinsic&) = default;
	Intrinsic& operator = (const Intrinsic&) = delete;

	YString print() const;

public:
	//! C-Callback
	void* callback = nullptr;
	//! name of the intrinsic
	const Yuni::ShortString64 name;
	//! The return type
	nytype_t rettype = nyt_void;
	//! The total number of parameters
	uint32_t paramcount = 0;
	//! All parameter types
	std::array<nytype_t, config::maxPushedParameters> params;
	//! Intrinsic ID
	uint32_t id = (uint32_t) - 1;

}; // struct Intrinsic

<commit_msg>intrinsics: reduce name max size from 64 down to 40<commit_after>#pragma once
#include "libnanyc.h"
#include <yuni/string.h>
#include <yuni/core/smartptr/intrusive.h>
#include "nany/nany.h"
#include "libnanyc-config.h"
#include <array>




namespace ny {

/*!
** \brief Definition of a single user-defined intrinsic
*/
struct Intrinsic final
	: public Yuni::IIntrusiveSmartPtr<Intrinsic, false, Yuni::Policy::SingleThreaded>
	, Yuni::NonCopyable<Intrinsic> {
public:
	Intrinsic(const AnyString& inname, void* callback)
		: callback(callback)
		, name(inname) {
		assert(inname.size() < name.chunkSize and "intrinsic name too long");
	}

	Intrinsic(const Intrinsic&) = default;
	Intrinsic& operator = (const Intrinsic&) = delete;

	YString print() const;

public:
	//! C-Callback
	void* callback = nullptr;
	//! name of the intrinsic
	const yuni::CString<40,false> name;
	//! The return type
	nytype_t rettype = nyt_void;
	//! The total number of parameters
	uint32_t paramcount = 0;
	//! All parameter types
	std::array<nytype_t, config::maxPushedParameters> params;
	//! Intrinsic ID
	uint32_t id = (uint32_t) - 1;

}; // struct Intrinsic


{'fraction_non_alphanumeric': 0.13214285714285715, 'fraction_numerical': 0.010714285714285714, 'mean_word_length': 4.659090909090909, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 16, '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': '5209706', 'n_tokens_mistral': 849, 'n_tokens_neox': 775, 'n_words': 203}