]>
git.ipfire.org Git - thirdparty/cups.git/blob - ppdc/ppdc-string.cxx
2 // Shared string class for the CUPS PPD Compiler.
4 // Copyright 2007-2012 by Apple Inc.
5 // Copyright 2002-2005 by Easy Software Products.
7 // Licensed under Apache License v2.0. See the file "LICENSE" for more information.
11 // Include necessary headers...
14 #include "ppdc-private.h"
18 // 'ppdcString::ppdcString()' - Create a shared string.
21 ppdcString::ppdcString(const char *v
) // I - String
28 size_t vlen
= strlen(v
);
30 value
= new char[vlen
+ 1];
31 memcpy(value
, v
, vlen
+ 1);
39 // 'ppdcString::~ppdcString()' - Destroy a shared string.
42 ppdcString::~ppdcString()
44 PPDC_DELETEVAL(value
);