]> gitweb.factorcode.org Git - factor.git/commitdiff
more asn1 compiles now, so fix errors. not sure why >ber-context-specific string...
authorDoug Coleman <doug.coleman@gmail.com>
Tue, 20 Jan 2009 11:05:51 +0000 (05:05 -0600)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 20 Jan 2009 11:05:51 +0000 (05:05 -0600)
extra/asn1/asn1-tests.factor
extra/asn1/asn1.factor

index 1908e28d39365d30ecb350a51850e15bca3ea173..3d46e06b686476fee5fff46818571d04e0a060ff 100755 (executable)
@@ -30,7 +30,7 @@ USING: asn1 asn1.ldap io io.streams.string tools.test ;
     ] unit-test
 
     [ B{ 133 6 97 98 99 100 101 102 } ] [ 
-        5 "abcdef" >ber-contextspecific 
+        5 "abcdef" >ber-contextspecific-string 
     ] unit-test
 
     ! triggers array
@@ -45,7 +45,7 @@ USING: asn1 asn1.ldap io io.streams.string tools.test ;
     ] unit-test
 
     [ B{ 160 4 49 50 51 52 } ] [ 
-        { 1 2 3 4 } >ber-contextspecific 
+        { 1 2 3 4 } >ber-contextspecific-array
     ] unit-test
 
 ] with-ber
index 51a9f5bbf90b3b1e7eb3ed9547875b997fa42572..2b96d2a4f4e02dde9f33c783815b61a9f609480c 100644 (file)
@@ -209,8 +209,7 @@ M: string >ber ( str -- byte-array )
 : >ber-application-string ( n str -- byte-array )
     [ HEX: 40 + set-tag ] dip >ber ;
 
-GENERIC: >ber-contextspecific ( n obj -- byte-array )
-M: string >ber-contextspecific ( n str -- byte-array )
+: >ber-contextspecific-string ( n str -- byte-array )
     [ HEX: 80 + set-tag ] dip >ber ;
 
 ! =========================================================
@@ -233,5 +232,5 @@ M: array >ber ( array -- byte-array )
 : >ber-appsequence ( array -- byte-array )
     HEX: 60 >ber-seq-internal ;
 
-M: array >ber-contextspecific ( array -- byte-array )
+: >ber-contextspecific-array ( array -- byte-array )
     HEX: A0 >ber-seq-internal ;