<commit_before>#include "pcsclite.h"
#include "common.h"

using namespace v8;
using namespace node;

Persistent<Function> PCSCLite::constructor;

void PCSCLite::init(Handle<Object> target) {

    // Prepare constructor template
    Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);
    tpl->SetClassName(NanNew("PCSCLite"));
    tpl->InstanceTemplate()->SetInternalFieldCount(1);
    // Prototype
    NanSetPrototypeTemplate(tpl, "start", NanNew<FunctionTemplate>(Start));
    NanSetPrototypeTemplate(tpl, "close", NanNew<FunctionTemplate>(Close));

    NanAssignPersistent<Function>(constructor, tpl->GetFunction());
    target->Set(NanNew("PCSCLite"), tpl->GetFunction());
}

PCSCLite::PCSCLite(): m_card_context(NULL),
                      m_card_reader_state(),
                      m_status_thread(NULL),
                      m_closing(false) {
<commit_msg>src: add unistd.h to fix sleep compilation error<commit_after>#include <unistd.h>
#include "pcsclite.h"
#include "common.h"

using namespace v8;
using namespace node;

Persistent<Function> PCSCLite::constructor;

void PCSCLite::init(Handle<Object> target) {

    // Prepare constructor template
    Local<FunctionTemplate> tpl = NanNew<FunctionTemplate>(New);
    tpl->SetClassName(NanNew("PCSCLite"));
    tpl->InstanceTemplate()->SetInternalFieldCount(1);
    // Prototype
    NanSetPrototypeTemplate(tpl, "start", NanNew<FunctionTemplate>(Start));
    NanSetPrototypeTemplate(tpl, "close", NanNew<FunctionTemplate>(Close));

    NanAssignPersistent<Function>(constructor, tpl->GetFunction());
    target->Set(NanNew("PCSCLite"), tpl->GetFunction());
}

PCSCLite::PCSCLite(): m_card_context(0),
                      m_card_reader_state(),
                      m_status_thread(0),
                      m_closing(false) {

{'fraction_non_alphanumeric': 0.13548028872848417, 'fraction_numerical': 0.003331482509716824, 'mean_word_length': 4.269005847953216, 'pattern_counts': {'":': 0, '<': 18, '<?xml version=': 0, '>': 30, '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': '2080714', 'n_tokens_mistral': 569, 'n_tokens_neox': 548, 'n_words': 87}