Example #1
0
func (c *Config) SetValue(section, key, value string) {
	s := C.CString(section)
	defer C.free(unsafe.Pointer(s))
	k := C.CString(key)
	defer C.free(unsafe.Pointer(k))
	v := C.CString(value)
	defer C.free(unsafe.Pointer(v))
	C.al_set_config_value((*C.ALLEGRO_CONFIG)(unsafe.Pointer(c)), s, k, v)
}
Example #2
0
func (c *Config) Set(section string, key string, val string) {
	ss := C.CString(section)
	defer C.free(unsafe.Pointer(ss))
	ks := C.CString(key)
	defer C.free(unsafe.Pointer(ks))
	vs := C.CString(val)
	defer C.free(unsafe.Pointer(vs))

	C.al_set_config_value((*C.ALLEGRO_CONFIG)(c), ss, ks, vs)

}