Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @[Link("krb5")]
- lib LibKRB
- type Context = Void*
- fun init_context = krb5_init_context(context : Context*) : LibC::UInt
- fun free_context = krb5_free_context(context : Context)
- end
- class Krb5
- def initialize
- ret = LibKRB.init_context(out ctx)
- # same as
- ctx = uninitialized LibKRB::Context
- ret = LibKRB.init_context(pointerof(ctx))
- raise "krb5_init_context() failed" if ret == 0
- end
- end
- puts Krb5.new
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement