From 61f964216b16b25200e2a2ac961f7444c0570daf Mon Sep 17 00:00:00 2001 From: dakkar Date: Thu, 10 Nov 2016 13:27:18 +0000 Subject: split into input / qrcode --- lib/Data/QRCode/XS.pm | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100644 lib/Data/QRCode/XS.pm (limited to 'lib/Data/QRCode/XS.pm') diff --git a/lib/Data/QRCode/XS.pm b/lib/Data/QRCode/XS.pm deleted file mode 100644 index aa8597a..0000000 --- a/lib/Data/QRCode/XS.pm +++ /dev/null @@ -1,47 +0,0 @@ -package Data::QRCode::XS; -use strict; -use warnings; -# ABSTRACT: qrcodes in C -# VERSION -use Data::QRCode::XS::Inline with => 'Alien::QREncode'; -use Data::QRCode::XS::Inline C => ( - 'DATA', - autowrap => 1, - typemaps => 'typemap', -); - -1; - -__DATA__ -__C__ - -int ECLEVEL_L() { return QR_ECLEVEL_L; } -int ECLEVEL_M() { return QR_ECLEVEL_M; } -int ECLEVEL_Q() { return QR_ECLEVEL_Q; } -int ECLEVEL_H() { return QR_ECLEVEL_H; } - -#define CLASS "Data::QRCode" - -QRcode* _build(const char* class, SV* data, int level, int version ) { - unsigned char * str; - STRLEN len; - - str = SvPVutf8(data,len); - return QRcode_encodeData(len,str,version,(QRecLevel)level); -} - -int version(QRcode* self) { - return self->version; -} - -int width(QRcode* self) { - return self->width; -} - -void DESTROY(QRcode* self) { - QRcode_free(self); -} - -int _data_at(QRcode* self, int x, int y) { - return self->data[x+y*self->width]; -} -- cgit v1.2.3